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.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 2.True or false: in <img>, src names the picture file. (a) False (b) True
- 3.Which of these is an opening tag? (a) </title> (b) </body> (c) </b> (d) <p>
- 4.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <a> (d) <pic>
-
5.🔍 Which line is missing its closing tag?
line 1: <h1>The red kite
line 2: <i>Hello, world!</i>
line 3: <small>Cricket is fun.</small> (a) line 2 (b) line 1 (c) line 3 -
6.📋 Does this list show bullets or numbers?
<ol>
<li>Litchi</li>
<li>Mango</li>
</ol> (a) bullets (b) numbers -
7.🔗 Where does this link open?
<a href="maths.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab -
8.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<p>Fun facts</p>
<p>My best friend</p>
<p>My pets</p> - 9.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
-
10.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Orange</li>
</ol> -
11.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Hello, world!</p>
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p> (a) I love mangoes. (b) Rain today (c) Hello, world! (d) Fun facts -
12.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Match report</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) index.html (b) Space Facts (c) We won by 5 runs. (d) Match report -
13.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Banana</li>
<li>Litchi</li>
<li>Guava</li>
</ul> -
14.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) Easy snacks (c) body (d) Riya’s Recipes - 15.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
-
16.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="300"> (a) A happy dog (b) Birthday cake (c) width (d) cake.jpg - 17.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
- 18.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h6> (d) <h3>
- 19.True or false: in <img>, width describes the picture. (a) True (b) False
- 20.True or false: a web browser saves our .html files. (a) True (b) False
- 21.True or false: a web server stores a website’s files. (a) False (b) True
- 22.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
- 23.Which of these is true of a web browser? (a) is where we type code (b) colours code to help us (c) has an address bar (d) hosts websites online
- 24.Which of these has a closing tag? (a) <b> (b) <hr> (c) <br> (d) <img>
-
25.🔗 Which words do you click on?
<a href="quiz.html">About us</a> (a) About us (b) Contact us (c) quiz.html (d) href -
26.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> - 27.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 28.🔍 Which is the odd one out? (a) has an address bar (b) answers page requests (c) opens web pages for us (d) turns HTML into a page
- 29.True or false: <hr> is an empty tag. (a) False (b) True
-
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="50"> (a) A red kite (b) Map of India (c) kite.png (d) width - 31.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <html> (c) </html> (d) <!DOCTYPE html>
-
32.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>My pets</p>
<p>Cricket is fun.</p>
<p>Fun facts</p> -
33.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) index.html (b) We won by 5 runs. (c) All about me (d) Space Facts -
34.🔍 One closing tag is missing. Which one?
<strong>Cricket is fun.</strong>
<small>I love mangoes.</small>
<h2>Our school trip (a) </h2> (b) </h1> (c) </strong> (d) </small> - 35.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
- 36.📝 What do we need to write HTML? (a) a paintbrush (b) a microphone (c) a printer (d) a plain text editor
- 37.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an attribute (d) an element name
- 38.💬 How does an HTML comment end? (a) */ (b) // (c) --> (d) >>
-
39.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> --> - 40.True or false: <h1> goes in the head. (a) False (b) True
Answer key
- has a closing tag
- True
- <p>
- <img>
- line 1
- numbers
- in a new tab
- 4
- <ul>
- 4
- Rain today
- Space Facts
- 4
- Easy snacks
- in the head
- Birthday cake
- <a href="about.html">
- <h6>
- False
- False
- True
- <ol>
- has an address bar
- <b>
- About us
- 150
- an opening tag
- answers page requests
- True
- A red kite
- <!DOCTYPE html>
- 3
- Space Facts
- </h2>
- a slash /
- a plain text editor
- an attribute
- -->
- 1
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids