Sample Questions

Question 1

If we want to display image on a webpage, then how would it be displayed? Write a piece of code in which followings must be used. Moreover, if we want to make the image a link, then what should we do?

(Marks: 05)

  1. The src attribute
  2. The alt attribute
  3. The width and height for the image

Question 2

Create a piece of code that will display a table on a webpage. The table should have following specifications.

(Marks: 05)

  1. Maximum width as 300px.
  2. A container will contain the table. The container will align the table at center position horizontally.
  3. Headers of the tables are Sr. No., Question Number and Page Number.
  4. Write only 2 entries in the table related to its header.

Question 3

Create a button in a HTML file (say index.html). The button should be styled using external CSS classes. Features of the button should have followings.

(Marks: 05)

  1. Center aligned along both horizontally and vertically
  2. Button color should be green and text color should be white.
  3. When hover over the button, then button color should be changed to red.

Question 4

Create a navbar that should be looked like as below. You can use any type of styling like inline, internal or external for styling the navbar.

(Marks: 05)

HomeServicesContact Us
LoginRegister

The navbar should has following features

  1. There are five links Home, Services, Contact Us, Login and Register
  2. Three likes are left aligned and two links are right aligned
  3. The navbar has outer border
  4. Background for the navbar is white and text color for all links are black
  5. When hover over any link, then the link should be underlined

Question 5

A piece of code for HTML file (MidQuestionPaper.html) is given below. In this code, containers for skills, projects and hobbies are created. You will have to set position of these containers according to different screen sizes. You will have to use external CSS.

(Marks: 05)

  1. For screen having size less than 600px, containers should be in sequence as Projects, Skills and Hobbies.
  2. For screen having size from 601px to 700px, container should be in sequence as Hobbies, Projects and Skills.
  3. For screen having size more than 700px, containers should be in sequence as they are created in HTML file.

1.   <!--File: MidQuestionPaper.html -->
2.    <div class="contentContainer">
3.      <div class="skills">Skills</div>
4.      <div class="projects">Projects</div>
5.      <div class="hobbies">Hobbies</div>
6.    </div>