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.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) attribute (d) address
- 2.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <ul> (d) <br>
-
3.🔍 Which line is missing its closing tag?
line 1: <p>My pets</p>
line 2: <strong>My best friend
line 3: <em>Rain today</em> (a) line 3 (b) line 2 (c) line 1 - 4.True or false: HTML on its own cannot make headings. (a) False (b) True
-
5.🔍 One closing tag is missing. Which one?
<small>Hello, world!</small>
<em>Fun facts
<i>The red kite</i> (a) </i> (b) </em> (c) </h3> (d) </small> - 6.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) at the bottom (d) on the browser tab
- 7.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <link> (d) <p>
- 8.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) has an address bar (d) answers page requests
- 9.📄 Can HTML on its own make headings? (a) Yes (b) No
-
10.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) index.html (c) Welcome! (d) Class 7 Blog -
11.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="350"> (a) width (b) kite.png (c) Map of India (d) A red kite - 12.🌐 Which one answers page requests? (a) a web browser (b) a code editor (c) a web server
- 13.Which of these is true of a web browser? (a) is where we type code (b) shows line numbers (c) answers page requests (d) opens web pages for us
- 14.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 15.True or false: <ul> lists steps in order. (a) True (b) False
- 16.True or false: in <img>, alt describes the picture. (a) True (b) False
- 17.True or false: <h1> is an empty tag. (a) True (b) False
-
18.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Fun facts</p>
<p>Rain today</p> - 19.Which of these goes in the body? (a) <title> (b) <h1> (c) <link rel="stylesheet"> (d) <style>
-
20.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Good morning!</p>
<p>I love mangoes.</p> (a) Rain today (b) Good morning! (c) I love mangoes. -
21.🔍 Which line is missing its closing tag?
line 1: <h2>My best friend
line 2: <em>Rain today</em>
line 3: <u>The red kite</u> (a) line 1 (b) line 2 (c) line 3 - 22.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 23.🔗 What does HyperText mean? (a) text in colour (b) very big text (c) text with links (d) secret text
-
24.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow</p> -
25.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Hello, world!</p>
<p>Good morning!</p>
<h2>Good morning!</h2>
<p>Good morning!</p>
<p>The red kite</p> -
26.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="250"> - 27.Which of these is a closing tag? (a) </body> (b) <body> (c) <li> (d) <b>
-
28.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) All about me (c) index.html (d) My Hobbies - 29.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3> (c) </h3> (d) <h3/>
- 30.Which of these is an empty tag? (a) <br> (b) <p> (c) <h1> (d) <li>
- 31.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h2> or <h4>? (a) <h2> (b) <h4> (c) <h5> (d) <h6>
-
32.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) Class 7 Blog (c) index.html (d) My drawings - 33.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
- 34.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 35.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h1> (d) <h3>
-
36.🔗 Where does this link open?
<a href="games.html">Contact us</a> (a) in the same tab (b) in a new tab - 37.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
38.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Birds sing<br>Roses are red<br>Sky is blue</p> -
39.🔗 Where does this link open?
<a href="art.html">School news</a> (a) in the same tab (b) in a new tab -
40.🔍 One closing tag is missing. Which one?
<h2>Fun facts</h2>
<h3>Hello, world!
<p>Rain today</p> (a) </p> (b) </b> (c) </h3> (d) </h2>
Answer key
- element
- <ul>
- line 2
- False
- </em>
- on the browser tab
- <a>
- answers page requests
- Yes
- Class 7 Blog
- A red kite
- a web server
- opens web pages for us
- No
- False
- True
- False
- 1
- <h1>
- Rain today
- line 1
- an empty tag
- text with links
- 2
- 5
- 250
- </body>
- My Hobbies
- </h3>
- <br>
- <h2>
- Class 7 Blog
- in the body
- has a closing tag
- <h6>
- in the same tab
- Yes
- 4
- in the same tab
- </h3>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids