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.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
- 2.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
- 3.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
4.🔍 Which line is missing its closing tag?
line 1: <small>Fun facts</small>
line 2: <u>I love mangoes.</u>
line 3: <p>The red kite (a) line 3 (b) line 2 (c) line 1 -
5.🔗 Which address opens when you click this link?
<a href="quiz.html">Art corner</a> (a) Art corner (b) games.html (c) quiz.html (d) about.html -
6.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="150"> (a) dog.jpg (b) map.png (c) cake.jpg (d) Map of India - 7.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) attribute (d) element
- 8.True or false: <ul> goes inside ul or ol. (a) False (b) True
- 9.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
-
10.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="50"> - 11.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <title> (d) <img>
- 12.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) src (d) href
-
13.🔗 Which words do you click on?
<a href="quiz.html">Maths fun</a> (a) href (b) quiz.html (c) Maths fun (d) Art corner - 14.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to make it bigger (d) to colour it
- 15.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
16.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Banana</li>
<li>Guava</li>
</ol> - 17.🏷️ Which is the closing tag for <u>? (a) <u> (b) </u> (c) <\u> (d) <u/>
-
18.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Good morning!</p> -->
<p>Fun facts</p> -
19.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) Space Facts (b) Easy snacks (c) Try this poha. (d) index.html - 20.True or false: <ol> is one item of a list. (a) False (b) True
-
21.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> --> - 22.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
23.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) body (b) All about me (c) Space Facts (d) Thanks for visiting. - 24.Which of these is a closing tag? (a) <p> (b) </title> (c) <body> (d) <b>
-
25.🔗 Which address opens when you click this link?
<a href="maths.html">About us</a> (a) news.html (b) art.html (c) maths.html (d) About us - 26.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h2> or <h3>? (a) <h3> (b) <h4> (c) <h1> (d) <h2>
-
27.🔍 Which line is missing its closing tag?
line 1: <p>The red kite</p>
line 2: <i>Rain today</i>
line 3: <b>My pets (a) line 3 (b) line 2 (c) line 1 -
28.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>Our school trip</p> -->
<!-- <p>The red kite</p> -->
<!-- <p>Hello, world!</p> --> -
29.🔍 One closing tag is missing. Which one?
<strong>Our school trip
<u>Rain today</u>
<i>Good morning!</i> (a) </i> (b) </strong> (c) </u> (d) </h1> -
30.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>My pets</h2>
<h2>Good morning!</h2>
<h2>Cricket is fun.</h2> -
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) A tiger asleep (b) width (c) tiger.jpg (d) A red kite - 32.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a src="about.html"> (d) <a alt="about.html">
- 33.Which of these is an opening tag? (a) </b> (b) <h1> (c) </li> (d) </p>
-
34.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Kites fly high<br>Stars shine</p> -
35.🔗 Where does this link open?
<a href="about.html">Take the quiz</a> (a) in a new tab (b) in the same tab -
36.🔗 Which words do you click on?
<a href="games.html">Visit the site</a> (a) Maths fun (b) href (c) Visit the site (d) games.html - 37.Which of these goes in the body? (a) <table> (b) <style> (c) <title> (d) <link rel="stylesheet">
-
38.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Fun facts</p>
<p>My best friend</p>
<!-- <p>My pets</p> --> (a) My pets (b) Fun facts (c) My best friend (d) I love mangoes. - 39.📝 What does <p> make? (a) a picture (b) a table (c) a link (d) a paragraph
- 40.📝 What do we need to write HTML? (a) a plain text editor (b) a paintbrush (c) a microphone (d) a printer
Answer key
- a line across the page
- on the browser tab
- an empty tag
- line 3
- quiz.html
- map.png
- element
- False
- in the head
- 50
- <img>
- href
- Maths fun
- to describe the image
- Yes
- 6
- </u>
- 1
- Space Facts
- False
- 2
- an opening tag
- All about me
- </title>
- maths.html
- <h4>
- line 3
- 1
- </strong>
- 4
- A tiger asleep
- <a href="about.html">
- <h1>
- 3
- in the same tab
- Visit the site
- <table>
- My pets
- a paragraph
- a plain text editor
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids