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.🔍 Which line is missing its closing tag?
line 1: <h2>Good morning!</h2>
line 2: <b>I love mangoes.
line 3: <h1>Rain today</h1> (a) line 2 (b) line 1 (c) line 3 -
2.🔍 Which line is missing its closing tag?
line 1: <h2>The red kite
line 2: <u>Rain today</u>
line 3: <i>Good morning!</i> (a) line 2 (b) line 3 (c) line 1 -
3.🔗 Where does this link open?
<a href="contact.html">Art corner</a> (a) in the same tab (b) in a new tab - 4.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <h2/> (c) <h2> (d) <\h2>
-
5.🔗 Which words do you click on?
<a href="news.html">Art corner</a> (a) School news (b) Art corner (c) href (d) news.html - 6.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
7.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> (a) A red kite (b) A tiger asleep (c) width (d) tiger.jpg - 8.Which of these is true of a web server? (a) answers page requests (b) colours code to help us (c) opens web pages for us (d) has an address bar
- 9.🔢 In a basic web page file, which comes first: “</html>” or “</head>”? (a) </html> (b) </head>
- 10.📝 What does <p> make? (a) a paragraph (b) a table (c) a picture (d) a link
-
11.📋 What number does the browser show next to “Papaya”?
<ol start="4">
<li>Orange</li>
<li>Banana</li>
<li>Guava</li>
<li>Papaya</li>
</ol> -
12.🔗 Which address opens when you click this link?
<a href="news.html">Play games</a> (a) quiz.html (b) games.html (c) Play games (d) news.html - 13.Which of these is an opening tag? (a) </p> (b) <title> (c) </b> (d) </li>
-
14.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers - 15.True or false: in <img>, src names the picture file. (a) False (b) True
- 16.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dot . (c) a hash # (d) a dollar $
- 17.Which of these goes in the body? (a) <title> (b) <p> (c) <style> (d) <meta charset="utf-8">
-
18.🔍 One closing tag is missing. Which one?
<em>I love mangoes.
<b>My pets</b>
<strong>My best friend</strong> (a) </h1> (b) </em> (c) </b> (d) </strong> - 19.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 20.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h1> or <h2>? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
- 21.🧱 HTML gives a web page its ___. (a) speed (b) colours (c) sound (d) structure
- 22.True or false: HTML on its own cannot make links to pages. (a) True (b) False
-
23.🔗 Which address opens when you click this link?
<a href="art.html">School news</a> (a) news.html (b) quiz.html (c) art.html (d) School news -
24.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Rain today</p>
<p>My best friend</p> - 25.True or false: in <img>, alt is read by screen readers. (a) True (b) False
-
26.🔗 Which address opens when you click this link?
<a href="quiz.html">Play games</a> (a) quiz.html (b) games.html (c) Play games (d) about.html - 27.Which of these is an empty tag? (a) <hr> (b) <b> (c) <h1> (d) <p>
-
28.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> --> (a) Cricket is fun. (b) The red kite (c) Our school trip -
29.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Our school trip</p>
<h2>I love mangoes.</h2>
<p>Good morning!</p>
<h2>Cricket is fun.</h2> - 30.True or false: <p> has a closing tag. (a) True (b) False
- 31.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h4> or <h5>? (a) <h6> (b) <h4> (c) <h5> (d) <h1>
-
32.🔗 Where does this link open?
<a href="games.html">Play games</a> (a) in a new tab (b) in the same tab - 33.🔢 In a basic web page file, which comes first: “</head>” or “<html>”? (a) </head> (b) <html>
- 34.📋 Which list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>
- 35.🔢 In a basic web page file, which comes first: “<body>” or “<head>”? (a) <head> (b) <body>
-
36.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>My best friend</p>
<p>My pets</p>
<p>Hello, world!</p>
<p>My pets</p> - 37.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 38.True or false: <ul> lists things in any order. (a) True (b) False
-
39.🔍 Which line is missing its closing tag?
line 1: <strong>Cricket is fun.
line 2: <i>My best friend</i>
line 3: <h2>I love mangoes.</h2> (a) line 2 (b) line 3 (c) line 1 -
40.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>Fun facts</p> -->
<p>Rain today</p>
<!-- <p>The red kite</p> -->
Answer key
- line 2
- line 1
- in the same tab
- </h2>
- Art corner
- Yes
- A tiger asleep
- answers page requests
- </head>
- a paragraph
- 7
- news.html
- <title>
- bullets
- True
- a slash /
- <p>
- </em>
- Yes
- <h6>
- structure
- False
- art.html
- 1
- True
- quiz.html
- <hr>
- Our school trip
- 3
- True
- <h6>
- in the same tab
- <html>
- <li>
- <head>
- 1
- an empty tag
- True
- line 1
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids