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.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 2.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ul> (d) <ol>
-
3.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>My best friend</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Good morning!</p> --> - 4.True or false: in <img>, height sets how tall it is. (a) True (b) False
- 5.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
6.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Planets</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Planets (b) Riya’s Recipes (c) We won by 5 runs. (d) index.html - 7.Which of these is an opening tag? (a) </title> (b) </p> (c) <body> (d) </h1>
-
8.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="100"> (a) The full moon (b) width (c) Our school bus (d) moon.png - 9.True or false: HTML on its own can make a form. (a) True (b) False
- 10.🔢 In a basic web page file, which comes first: “</body>” or “<body>”? (a) </body> (b) <body>
- 11.Which of these is a closing tag? (a) </p> (b) <p> (c) <h1> (d) <body>
- 12.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
13.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p>
<!-- <p>I love mangoes.</p> --> -
14.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="250"> (a) map.png (b) A red kite (c) kite.png (d) cake.jpg - 15.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h3> or <h5>? (a) <h2> (b) <h4> (c) <h3> (d) <h5>
- 16.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h3>? (a) <h3> (b) <h1> (c) <h4> (d) <h2>
- 17.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
-
18.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Grapes</li>
<li>Guava</li>
</ol> - 19.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 20.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to load it faster (c) to colour it (d) to make it bigger
- 21.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <ul> (c) <style> (d) <title>
- 22.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
23.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>Good morning!</h2>
<p>Rain today</p>
<p>My best friend</p> - 24.Which of these goes in the head? (a) <img> (b) <meta charset="utf-8"> (c) <h1> (d) <a>
-
25.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="150"> -
26.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p>
<p>Our school trip</p> (a) Cricket is fun. (b) I love mangoes. (c) Our school trip (d) Fun facts -
27.🔗 Where does this link open?
<a href="games.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab - 28.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
- 29.Which of these is an opening tag? (a) </li> (b) <h1> (c) </title> (d) </body>
- 30.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
- 31.🌐 Which one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
-
32.🔗 Which address opens when you click this link?
<a href="about.html">Take the quiz</a> (a) https://example.com (b) Take the quiz (c) about.html (d) contact.html -
33.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p>
<!-- <p>Rain today</p> --> - 34.True or false: a web server is where we type code. (a) False (b) True
- 35.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 36.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
-
37.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h4>The red kite</h4>
<p>The red kite</p>
<h2>Hello, world!</h2> - 38.🔍 Which is the odd one out? (a) answers page requests (b) sends pages over the net (c) stores a website’s files (d) colours code to help us
- 39.True or false: a code editor sends pages over the net. (a) False (b) True
- 40.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) opens web pages for us (d) saves our .html files
Answer key
- in the head
- <ul>
- 1
- True
- an empty tag
- Riya’s Recipes
- <body>
- The full moon
- True
- <body>
- </p>
- a closing tag
- 1
- kite.png
- <h2>
- <h1>
- <a href="about.html">
- 3
- has a closing tag
- to describe the image
- <ul>
- Yes
- 3
- <meta charset="utf-8">
- 150
- Fun facts
- in a new tab
- a web browser
- <h1>
- in the head
- a web browser
- about.html
- 1
- False
- No
- an attribute
- 3
- colours code to help us
- False
- opens web pages for us
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids