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.🔍 One closing tag is missing. Which one?
<h2>I love mangoes.</h2>
<h1>Our school trip</h1>
<strong>Good morning! (a) </h3> (b) </h2> (c) </strong> (d) </h1> - 2.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 3.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
-
4.📋 What number does the browser show next to “Mango”?
<ol start="3">
<li>Jamun</li>
<li>Grapes</li>
<li>Mango</li>
</ol> - 5.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h5> or <h2>? (a) <h1> (b) <h5> (c) <h2> (d) <h4>
- 6.True or false: <ul> lists things in any order. (a) False (b) True
- 7.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
- 8.Which of these is an empty tag? (a) <h1> (b) <b> (c) <li> (d) <input>
- 9.Which of these goes in the body? (a) <ul> (b) <style> (c) <link rel="stylesheet"> (d) <title>
-
10.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> -->
<p>Our school trip</p>
<p>My pets</p> (a) Our school trip (b) Fun facts (c) I love mangoes. (d) My pets - 11.Which of these is true of a web server? (a) has an address bar (b) answers page requests (c) colours code to help us (d) opens web pages for us
- 12.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
13.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> (a) tiger.jpg (b) width (c) A red kite (d) A tiger asleep -
14.📄 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) Space Facts (c) Thanks for visiting. (d) Planets - 15.🔢 In a basic web page file, which comes LAST? (a) <body> (b) </body> (c) </html> (d) </head>
- 16.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
17.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> --> - 18.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) alt (c) width (d) height
-
19.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Fun facts</p> -->
<p>Good morning!</p>
<!-- <p>The red kite</p> -->
<!-- <p>My best friend</p> --> - 20.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 21.True or false: <ul> goes inside ul or ol. (a) True (b) False
- 22.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) </h1> (d) <h1/>
- 23.Which of these is an opening tag? (a) </b> (b) </li> (c) </title> (d) <h1>
- 24.🧱 HTML gives a web page its ___. (a) sound (b) structure (c) colours (d) speed
- 25.True or false: <li> is an ordered list. (a) True (b) False
- 26.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ul> (d) <ol>
- 27.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an element name (d) an attribute
-
28.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p> -
29.🔍 Which line is missing its closing tag?
line 1: <h3>Fun facts</h3>
line 2: <i>Cricket is fun.
line 3: <b>Good morning!</b> (a) line 1 (b) line 3 (c) line 2 - 30.📝 What does <hr> draw? (a) a link (b) a picture (c) a line across the page (d) a table
- 31.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h6> or <h3>? (a) <h3> (b) <h5> (c) <h6> (d) <h1>
- 32.True or false: HTML on its own can make a form. (a) False (b) True
- 33.True or false: in <img>, src is read by screen readers. (a) True (b) False
- 34.True or false: <ol> is an unordered list. (a) True (b) False
-
35.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p> - 36.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to colour it (d) to load it faster
-
37.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Hello, world!</p>
<p>My pets</p>
<h4>My pets</h4> -
38.🔗 Which words do you click on?
<a href="about.html">Maths fun</a> (a) Art corner (b) href (c) Maths fun (d) about.html -
39.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow<br>Birds sing<br>Sky is blue</p> -
40.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red<br>Sky is blue</p>
Answer key
- </strong>
- No
- <a>
- 5
- <h1>
- True
- on the browser tab
- <input>
- <ul>
- Fun facts
- answers page requests
- Yes
- A tiger asleep
- Space Facts
- </html>
- an opening tag
- 1
- alt
- 1
- in the head
- False
- </h1>
- <h1>
- structure
- False
- <li>
- an attribute
- 3
- line 2
- a line across the page
- <h6>
- True
- False
- False
- 1
- to describe the image
- 2
- Maths fun
- 4
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids