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 heading shows the BIGGEST text: <h2>, <h1>, <h4> or <h3>? (a) <h2> (b) <h4> (c) <h1> (d) <h3>
- 2.Which of these is a closing tag? (a) <body> (b) <p> (c) <h1> (d) </li>
- 3.True or false: <ol> lists steps in order. (a) True (b) False
-
4.📋 What number does the browser show next to “Papaya”?
<ol start="5">
<li>Grapes</li>
<li>Orange</li>
<li>Papaya</li>
</ol> - 5.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
- 6.🔍 Which is the odd one out? (a) saves our .html files (b) answers page requests (c) colours code to help us (d) is where we type code
-
7.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) dog.jpg (b) A happy dog (c) bus.jpg (d) moon.png - 8.True or false: a code editor has an address bar. (a) True (b) False
-
9.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="400"> (a) dog.jpg (b) Birthday cake (c) cake.jpg (d) moon.png - 10.🌐 Which one is where we type code? (a) a code editor (b) a web browser (c) a web server
-
11.🔗 Which words do you click on?
<a href="https://example.com">Visit the site</a> (a) href (b) Visit the site (c) https://example.com (d) Maths fun -
12.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) index.html (b) Easy snacks (c) Art Gallery (d) I like to read. -
13.📋 What number does the browser show next to “Mango”?
<ol start="6">
<li>Orange</li>
<li>Mango</li>
<li>Banana</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Litchi</li>
</ol> -
14.🔗 Which address opens when you click this link?
<a href="about.html">Art corner</a> (a) Art corner (b) about.html (c) contact.html (d) https://example.com -
15.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Contact us</a> (a) in the same tab (b) in a new tab - 16.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Laptop (d) Language
-
17.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Mango</li>
<li>Litchi</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Guava</li>
</ol> -
18.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Cricket is fun.</p> -->
<p>Our school trip</p> -
19.🔍 Which line is missing its closing tag?
line 1: <small>Cricket is fun.</small>
line 2: <em>My pets
line 3: <b>The red kite</b> (a) line 2 (b) line 1 (c) line 3 - 20.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <body> (c) </head> (d) <html>
- 21.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
22.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Cricket is fun.</p>
<h2>My best friend</h2>
<p>My best friend</p> - 23.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <br> (d) <ol>
-
24.📋 What number does the browser show next to “Banana”?
<ol>
<li>Papaya</li>
<li>Banana</li>
<li>Mango</li>
</ol> - 25.📝 What do we need to write HTML? (a) a microphone (b) a paintbrush (c) a plain text editor (d) a printer
-
26.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="150"> -
27.🔗 Which address opens when you click this link?
<a href="about.html">School news</a> (a) https://example.com (b) School news (c) contact.html (d) about.html - 28.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h5> or <h6>? (a) <h5> (b) <h6> (c) <h3> (d) <h4>
- 29.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 30.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //
- 31.Which of these is a closing tag? (a) <title> (b) <p> (c) <body> (d) </h1>
-
32.🔍 One closing tag is missing. Which one?
<h1>Fun facts</h1>
<p>I love mangoes.</p>
<small>The red kite (a) </h3> (b) </p> (c) </small> (d) </h1> - 33.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
- 34.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) width (d) height
- 35.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
- 36.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
37.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) Welcome! (c) body (d) Space Facts - 38.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
39.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>My pets</p>
<h2>Fun facts</h2>
<h2>Fun facts</h2>
<h2>Good morning!</h2> -
40.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) width (b) An old fort (c) bus.jpg (d) Our school bus
Answer key
- <h1>
- </li>
- True
- 7
- in the body
- answers page requests
- dog.jpg
- False
- cake.jpg
- a code editor
- Visit the site
- Art Gallery
- 7
- about.html
- in a new tab
- Language
- 6
- 2
- line 2
- <!DOCTYPE html>
- has a closing tag
- 3
- <ul>
- 2
- a plain text editor
- 150
- about.html
- <h3>
- a closing tag
- <!--
- </h1>
- </small>
- <li>
- alt
- <li>
- an empty tag
- Welcome!
- an opening tag
- 2
- Our school bus
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids