HTML Practical Exam – Mock Paper
(25 Marks)
Time: 45 minutes
Total Marks: 25
Instructions: Write HTML code for each question. Use deprecated tags where
asked.
Q1. (5 marks)
Write an HTML program that:
– Sets the background color to black.
– Adds all six headings (<h1> to <h6>).
– Inserts a horizontal rule.
Q2. (4 marks)
Create a paragraph that includes:
– Bold, Italic, Underlined, and Strike-through text
– Subscript (H₂O) and Superscript (E = mc²)
Q3. (5 marks)
Insert an image using the <img> tag with:
– Height: 150px
– Width: 150px
– Border: 2px
– Align: Left
– Image file name: abc.jpg
Q4. (4 marks)
Create a hyperlink to https://youtube.com/.
Use the deprecated <center> tag to center this text.
Q5. (4 marks)
Use the <nobr> tag to display the sentence:
“This line should not break even if it overflows.”
Q6. (3 marks)
Insert a line break between two sentences in a paragraph.