HTML Worksheet: Practice Test
Code tip (Read the code like a browser): Find the topic of the question: tags, headings, lists, links, images, structure or comments. Read the code line by line, the way a browser would. Count carefully: tags opened and closed, items, lines, paragraphs.
NameDateTime takenScore ___ / 40
- 1.💬 How does an HTML comment start? (a) # (b) // (c) /* (d) <!--
- 2.Which of these is a closing tag? (a) <title> (b) </li> (c) <b> (d) <li>
- 3.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h5>? (a) <h2> (b) <h6> (c) <h1> (d) <h5>
- 4.True or false: <ol> is an unordered list. (a) True (b) False
-
5.🔍 Which line is missing its closing tag?
line 1: <h2>I love mangoes.</h2>
line 2: <u>My pets</u>
line 3: <b>My best friend (a) line 1 (b) line 3 (c) line 2 -
6.🔍 Which line is missing its closing tag?
line 1: <h3>Rain today</h3>
line 2: <h1>Hello, world!</h1>
line 3: <p>Cricket is fun. (a) line 3 (b) line 2 (c) line 1 -
7.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>Rain today</h2>
<h2>The red kite</h2>
<h3>Hello, world!</h3>
<h3>Cricket is fun.</h3> - 8.Which of these is an empty tag? (a) <p> (b) <b> (c) <li> (d) <img>
-
9.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue</p> - 10.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
- 11.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
-
12.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="250"> (a) map.png (b) Map of India (c) dog.jpg (d) cake.jpg - 13.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 14.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
- 15.📝 What does <br> do? (a) starts a new line (b) adds a picture (c) makes text bold (d) makes a list
- 16.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
- 17.Which of these is true of a web browser? (a) shows line numbers (b) stores a website’s files (c) answers page requests (d) turns HTML into a page
- 18.Which of these goes in the head? (a) <table> (b) <h1> (c) <p> (d) <title>
-
19.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Kites fly high<br>Sky is blue<br>Rivers flow<br>Stars shine</p> -
20.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) All about me (b) Mars is red. (c) body (d) Class 7 Blog -
21.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) Play games (b) maths.html (c) https://example.com (d) contact.html - 22.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h2> or <h4>? (a) <h5> (b) <h4> (c) <h2> (d) <h6>
- 23.🔢 In a basic web page file, which comes first: “</body>” or “</head>”? (a) </body> (b) </head>
- 24.True or false: in <img>, alt names the picture file. (a) True (b) False
- 25.True or false: a code editor colours code to help us. (a) False (b) True
- 26.True or false: <table> goes in the head. (a) True (b) False
- 27.🏷️ Which is the closing tag for <p>? (a) <p> (b) <p/> (c) <\p> (d) </p>
- 28.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as a dot (c) as 5 spaces (d) as one space
- 29.True or false: in <img>, src shows if the image fails. (a) False (b) True
-
30.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<p>My pets</p>
<p>Fun facts</p> - 31.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 32.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h3> or <h2>? (a) <h3> (b) <h6> (c) <h1> (d) <h2>
-
33.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Roses are red</p> -
34.🔗 Which words do you click on?
<a href="news.html">Play games</a> (a) About us (b) news.html (c) href (d) Play games -
35.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p>
<p>Cricket is fun.</p>
<p>My pets</p> (a) Good morning! (b) My pets (c) Cricket is fun. (d) Hello, world! -
36.🔍 Which line is missing its closing tag?
line 1: <p>Hello, world!</p>
line 2: <u>My best friend</u>
line 3: <i>My pets (a) line 2 (b) line 1 (c) line 3 - 37.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h2> or <h4>? (a) <h3> (b) <h2> (c) <h5> (d) <h4>
-
38.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>The red kite</p>
<p>Hello, world!</p> - 39.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h5>? (a) <h2> (b) <h5> (c) <h3> (d) <h1>
-
40.🔍 One closing tag is missing. Which one?
<h1>Hello, world!</h1>
<p>The red kite
<h3>Our school trip</h3> (a) </h3> (b) </h2> (c) </p> (d) </h1>
Answer key
- <!--
- </li>
- <h1>
- False
- line 3
- line 3
- 5
- <img>
- 2
- <ul>
- <ol>
- map.png
- has a closing tag
- <!DOCTYPE html>
- starts a new line
- <ol>
- turns HTML into a page
- <title>
- 5
- All about me
- contact.html
- <h2>
- </head>
- False
- True
- False
- </p>
- as one space
- False
- 3
- No
- <h1>
- 2
- Play games
- Good morning!
- line 3
- <h5>
- 3
- <h5>
- </p>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids