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 <h1> headings should a page usually have? (a) 1 (b) 3 (c) 10 (d) 6
- 2.Which of these goes in the head? (a) <h1> (b) <p> (c) <img> (d) <meta charset="utf-8">
-
3.🔍 Which line is missing its closing tag?
line 1: <p>My best friend
line 2: <h3>Our school trip</h3>
line 3: <small>I love mangoes.</small> (a) line 3 (b) line 1 (c) line 2 -
4.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>Hello, world!</p> -->
<p>My best friend</p> (a) My best friend (b) Rain today (c) Hello, world! -
5.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="400"> (a) cake.jpg (b) dog.jpg (c) Map of India (d) map.png -
6.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) body (c) Welcome! (d) Space Facts - 7.Which of these is an opening tag? (a) </title> (b) </p> (c) <title> (d) </body>
- 8.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the head (d) the title
- 9.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <table> (d) <style>
- 10.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
- 11.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
12.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Good morning!</p>
<p>Good morning!</p> - 13.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
- 14.📝 What do we need to write HTML? (a) a paintbrush (b) a printer (c) a microphone (d) a plain text editor
- 15.True or false: HTML on its own cannot make a form. (a) False (b) True
- 16.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h4>? (a) <h5> (b) <h6> (c) <h2> (d) <h4>
-
17.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Guava</li>
<li>Orange</li>
<li>Papaya</li>
<li>Mango</li>
<li>Litchi</li>
</ol> - 18.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h4> or <h1>? (a) <h3> (b) <h5> (c) <h1> (d) <h4>
- 19.Which of these has a closing tag? (a) <hr> (b) <img> (c) <p> (d) <br>
- 20.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <img> (d) <p>
- 21.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) height (d) src
- 22.Which of these goes in the body? (a) <style> (b) <meta charset="utf-8"> (c) <title> (d) <h1>
- 23.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
- 24.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) height (c) width (d) src
- 25.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
26.🔗 Where does this link open?
<a href="quiz.html">About us</a> (a) in a new tab (b) in the same tab -
27.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>I love mangoes.</p>
<p>My pets</p> (a) I love mangoes. (b) My best friend (c) My pets - 28.📋 Which list suits a shopping list in any order? (a) <ul> (b) <hr> (c) <ol> (d) <br>
- 29.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <p> (d) <title>
- 30.True or false: <li> is an empty tag. (a) True (b) False
- 31.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) src (d) alt
- 32.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h2>? (a) <h3> (b) <h2> (c) <h5> (d) <h6>
-
33.🔍 One closing tag is missing. Which one?
<h3>Hello, world!
<i>Our school trip</i>
<em>Rain today</em> (a) </i> (b) </em> (c) </h2> (d) </h3> -
34.🔍 One closing tag is missing. Which one?
<small>The red kite
<h3>Good morning!</h3>
<em>Rain today</em> (a) </small> (b) </h3> (c) </em> (d) </h1> -
35.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Guava</li>
<li>Mango</li>
<li>Orange</li>
<li>Jamun</li>
</ol> -
36.🔍 One closing tag is missing. Which one?
<em>My pets
<p>Good morning!</p>
<u>My best friend</u> (a) </p> (b) </em> (c) </h3> (d) </u> -
37.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Papaya</li>
</ul> - 38.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
- 39.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 40.Which of these is a closing tag? (a) <li> (b) <b> (c) <body> (d) </li>
Answer key
- 1
- <meta charset="utf-8">
- line 1
- Hello, world!
- map.png
- Welcome!
- <title>
- the body
- <table>
- Yes
- has a closing tag
- 3
- <!--
- a plain text editor
- False
- <h2>
- 6
- <h1>
- <p>
- <a>
- height
- <h1>
- element
- alt
- a closing tag
- in the same tab
- My best friend
- <ul>
- <p>
- False
- alt
- <h2>
- </h3>
- </small>
- 4
- </em>
- 2
- an attribute
- Yes
- </li>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids