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 many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>My best friend</p>
<p>Cricket is fun.</p>
<p>My pets</p> - 2.📄 Can HTML on its own make tables? (a) No (b) Yes
-
3.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="100"> (a) Map of India (b) width (c) Birthday cake (d) map.png - 4.💬 Does the browser show comments on the page? (a) Yes (b) No
- 5.True or false: HTML on its own can keep a high score. (a) True (b) False
- 6.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) </head> (c) </body> (d) <!DOCTYPE html>
- 7.True or false: <p> has a closing tag. (a) True (b) False
-
8.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) Visit the site (b) Maths fun (c) href (d) contact.html -
9.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Mango</li>
<li>Guava</li>
<li>Grapes</li>
<li>Banana</li>
<li>Papaya</li>
</ul> - 10.True or false: <img> has a closing tag. (a) False (b) True
-
11.🔗 Where does this link open?
<a href="contact.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab - 12.🖼️ Which attribute of <img> tells which image to load? (a) src (b) width (c) alt (d) height
- 13.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Language (c) Line (d) Link
-
14.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="50"> (a) cake.jpg (b) map.png (c) dog.jpg (d) Map of India - 15.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h2>? (a) <h3> (b) <h1> (c) <h2> (d) <h4>
- 16.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h5> or <h1>? (a) <h6> (b) <h5> (c) <h1> (d) <h3>
-
17.🔍 Which line is missing its closing tag?
line 1: <u>Hello, world!</u>
line 2: <i>I love mangoes.
line 3: <small>Our school trip</small> (a) line 3 (b) line 1 (c) line 2 -
18.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> -
19.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Planets</h1>
<p>Mars is red.</p>
</body>
</html> (a) Class 7 Blog (b) Planets (c) body (d) Mars is red. -
20.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> -->
<p>Fun facts</p> (a) I love mangoes. (b) Fun facts (c) Cricket is fun. (d) Our school trip - 21.Which of these is true of a web browser? (a) is where we type code (b) colours code to help us (c) shows line numbers (d) opens web pages for us
-
22.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Kites fly high<br>Rivers flow<br>Stars shine</p> - 23.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h2>? (a) <h5> (b) <h2> (c) <h6> (d) <h1>
-
24.🔍 Which line is missing its closing tag?
line 1: <strong>The red kite</strong>
line 2: <p>Fun facts</p>
line 3: <h3>My best friend (a) line 3 (b) line 1 (c) line 2 -
25.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> -->
<!-- <p>Cricket is fun.</p> --> -
26.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="150"> (a) cake.jpg (b) Birthday cake (c) dog.jpg (d) moon.png - 27.True or false: <ol> is an ordered list. (a) True (b) False
- 28.Which of these has a closing tag? (a) <input> (b) <br> (c) <li> (d) <img>
- 29.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
-
30.📋 What number does the browser show next to “Orange”?
<ol start="3">
<li>Grapes</li>
<li>Orange</li>
<li>Papaya</li>
<li>Banana</li>
</ol> - 31.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h1> or <h6>? (a) <h6> (b) <h2> (c) <h1> (d) <h5>
-
32.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Litchi</li>
<li>Guava</li>
<li>Mango</li>
</ol> - 33.Which of these is a closing tag? (a) <body> (b) <h1> (c) <li> (d) </h1>
- 34.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
- 35.True or false: in <img>, width is read by screen readers. (a) True (b) False
- 36.True or false: HTML on its own cannot count button clicks. (a) True (b) False
- 37.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 38.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
39.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Sky is blue<br>Kites fly high</p> -
40.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) width (b) dog.jpg (c) A happy dog (d) The full moon
Answer key
- 3
- Yes
- Map of India
- No
- False
- <!DOCTYPE html>
- True
- Visit the site
- 6
- False
- in a new tab
- src
- Language
- map.png
- <h4>
- <h1>
- line 2
- 400
- Planets
- Our school trip
- opens web pages for us
- 5
- <h1>
- line 3
- 1
- cake.jpg
- True
- <li>
- to leave notes
- 4
- <h1>
- 4
- </h1>
- <ol>
- False
- True
- an empty tag
- an opening tag
- 3
- A happy dog
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids