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 tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <p> (d) <br>
-
2.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="50"> (a) An old fort (b) A tiger asleep (c) fort.jpg (d) width - 3.Which of these is a closing tag? (a) <b> (b) <h1> (c) </h1> (d) <li>
- 4.True or false: <ol> shows bullet points. (a) True (b) False
- 5.Which of these is an empty tag? (a) <hr> (b) <ul> (c) <h1> (d) <li>
- 6.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <style> (d) <p>
-
7.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Good morning!</p>
<h2>Cricket is fun.</h2>
<p>I love mangoes.</p>
<h4>Our school trip</h4> - 8.Which of these is an opening tag? (a) </p> (b) </title> (c) <p> (d) </b>
- 9.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) turns HTML into a page (d) is where we type code
- 10.📝 What does <p> make? (a) a paragraph (b) a picture (c) a table (d) a link
- 11.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Language (d) Link
- 12.True or false: <li> lists steps in order. (a) True (b) False
- 13.True or false: a web server saves our .html files. (a) False (b) True
- 14.True or false: <li> goes inside ul or ol. (a) True (b) False
-
15.🔍 One closing tag is missing. Which one?
<b>Cricket is fun.</b>
<strong>My best friend
<h2>Good morning!</h2> (a) </i> (b) </b> (c) </h2> (d) </strong> - 16.True or false: <ul> shows 1, 2, 3 numbers. (a) True (b) False
-
17.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>My best friend</p> -
18.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>I love mangoes.</h2>
<p>My best friend</p>
<h2>Hello, world!</h2> - 19.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <hr> (d) <br>
-
20.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Guava</li>
</ul> -
21.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) index.html (b) Mars is red. (c) All about me (d) Art Gallery - 22.True or false: in <img>, width sets how tall it is. (a) False (b) True
- 23.💬 Does the browser show comments on the page? (a) Yes (b) No
-
24.🔗 Where does this link open?
<a href="https://example.com" target="_blank">About us</a> (a) in the same tab (b) in a new tab - 25.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h4>? (a) <h1> (b) <h5> (c) <h4> (d) <h2>
-
26.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Mango</li>
<li>Guava</li>
<li>Litchi</li>
</ol> - 27.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
28.🔍 Which line is missing its closing tag?
line 1: <p>I love mangoes.
line 2: <u>Rain today</u>
line 3: <small>Our school trip</small> (a) line 2 (b) line 1 (c) line 3 - 29.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
-
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="300"> (a) Birthday cake (b) A happy dog (c) cake.jpg (d) width - 31.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
- 32.🔍 Which is the odd one out? (a) has an address bar (b) shows line numbers (c) saves our .html files (d) colours code to help us
-
33.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="300"> - 34.True or false: HTML on its own can make links to pages. (a) False (b) True
- 35.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
- 36.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) src (d) href
- 37.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
- 38.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 39.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <p> (d) <ul>
- 40.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h1> or <h5>? (a) <h6> (b) <h5> (c) <h3> (d) <h1>
Answer key
- <h1>
- An old fort
- </h1>
- False
- <hr>
- <p>
- 3
- <p>
- is where we type code
- a paragraph
- Language
- False
- False
- True
- </strong>
- False
- 3
- 2
- <ul>
- 2
- Art Gallery
- False
- No
- in a new tab
- <h5>
- 3
- an opening tag
- line 1
- 6
- Birthday cake
- <li>
- has an address bar
- 300
- True
- <a>
- href
- <h6>
- a closing tag
- <li>
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids