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.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Planets</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) Planets (c) Thanks for visiting. (d) Space Facts -
2.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Sky is blue</p> -
3.🔗 Which address opens when you click this link?
<a href="about.html">School news</a> (a) https://example.com (b) about.html (c) contact.html (d) School news - 4.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h4> or <h2>? (a) <h6> (b) <h2> (c) <h5> (d) <h4>
- 5.True or false: <h1> is an empty tag. (a) True (b) False
-
6.🔍 One closing tag is missing. Which one?
<small>Our school trip</small>
<b>The red kite
<h3>Rain today</h3> (a) </h3> (b) </small> (c) </p> (d) </b> -
7.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="150"> (a) A happy dog (b) bus.jpg (c) moon.png (d) dog.jpg -
8.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="250"> (a) A red kite (b) Map of India (c) width (d) kite.png - 9.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h2> (d) <h6>
- 10.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
11.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow</p> -
12.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) map.png (b) tiger.jpg (c) kite.png (d) A tiger asleep - 13.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <table> (d) <style>
- 14.True or false: HTML on its own can pick a random number. (a) True (b) False
-
15.🔗 Which address opens when you click this link?
<a href="https://example.com">School news</a> (a) art.html (b) School news (c) maths.html (d) https://example.com -
16.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> --> (a) My best friend (b) Good morning! (c) Cricket is fun. - 17.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) width (c) src (d) alt
- 18.True or false: a code editor has an address bar. (a) False (b) True
- 19.True or false: <ol> lists things in any order. (a) True (b) False
- 20.💬 How does an HTML comment end? (a) // (b) */ (c) >> (d) -->
- 21.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 22.Which of these is a closing tag? (a) <p> (b) </body> (c) <li> (d) <b>
-
23.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h2>The red kite</h2>
<h2>Rain today</h2>
<p>Cricket is fun.</p>
<p>My pets</p> - 24.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
-
25.🔗 Where does this link open?
<a href="contact.html">School news</a> (a) in the same tab (b) in a new tab - 26.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h6>? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
- 27.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 3 (d) 6
-
28.🔍 One closing tag is missing. Which one?
<b>Fun facts</b>
<h3>I love mangoes.
<strong>Hello, world!</strong> (a) </b> (b) </strong> (c) </h2> (d) </h3> - 29.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h4> or <h5>? (a) <h5> (b) <h4> (c) <h3> (d) <h1>
- 30.True or false: <ol> goes inside ul or ol. (a) False (b) True
-
31.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Cricket Club (b) Here is my best one. (c) body (d) All about me - 32.🔍 Which is the odd one out? (a) shows pages from the web (b) has an address bar (c) opens web pages for us (d) answers page requests
-
33.🔍 Which line is missing its closing tag?
line 1: <h1>Our school trip
line 2: <p>Rain today</p>
line 3: <h2>Good morning!</h2> (a) line 2 (b) line 3 (c) line 1 - 34.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h4> or <h5>? (a) <h1> (b) <h6> (c) <h5> (d) <h4>
- 35.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
-
36.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="50"> (a) cake.jpg (b) dog.jpg (c) Map of India (d) map.png - 37.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
- 38.Which of these has a closing tag? (a) <meta> (b) <title> (c) <img> (d) <br>
-
39.🔗 Which address opens when you click this link?
<a href="contact.html">Take the quiz</a> (a) https://example.com (b) maths.html (c) Take the quiz (d) contact.html - 40.Which of these goes in the body? (a) <h1> (b) <style> (c) <title> (d) <link rel="stylesheet">
Answer key
- Space Facts
- 3
- about.html
- <h2>
- False
- </b>
- dog.jpg
- A red kite
- <h2>
- an opening tag
- 2
- tiger.jpg
- <table>
- False
- https://example.com
- Cricket is fun.
- height
- False
- False
- -->
- No
- </body>
- 3
- in the body
- in the same tab
- <h6>
- 1
- </h3>
- <h1>
- False
- All about me
- answers page requests
- line 1
- <h1>
- <li>
- map.png
- <ul>
- <title>
- contact.html
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids