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.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>Our school trip</h2>
<h2>My pets</h2>
<p>I love mangoes.</p>
<p>Rain today</p>
<p>My pets</p> -
2.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Kites fly high<br>Sky is blue<br>Roses are red</p> -
3.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>Our school trip</p>
<p>I love mangoes.</p> - 4.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h6> or <h1>? (a) <h3> (b) <h6> (c) <h4> (d) <h1>
- 5.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
- 6.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Language (c) Line (d) Link
-
7.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) My Hobbies (b) Easy snacks (c) index.html (d) Try this poha. -
8.🔗 Where does this link open?
<a href="maths.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab -
9.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) About us (b) href (c) https://example.com (d) Play games - 10.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
- 11.True or false: HTML on its own can count button clicks. (a) False (b) True
- 12.True or false: <p> has a closing tag. (a) True (b) False
- 13.True or false: HTML on its own can pick a random number. (a) True (b) False
- 14.🌐 Which one stores a website’s files? (a) a code editor (b) a web browser (c) a web server
- 15.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
- 16.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
-
17.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>My best friend</p>
<p>Our school trip</p>
<h2>My pets</h2>
<h3>Cricket is fun.</h3> - 18.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
- 19.Which of these goes in the head? (a) <ul> (b) <title> (c) <p> (d) <table>
- 20.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) src (d) alt
-
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="250"> (a) width (b) map.png (c) Birthday cake (d) Map of India - 22.📄 Can HTML on its own make tables? (a) No (b) Yes
- 23.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 24.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h1> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h6>
- 25.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
- 26.True or false: <li> is an ordered list. (a) True (b) False
-
27.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue<br>Birds sing<br>Stars shine<br>Roses are red</p> -
28.🔍 Which line is missing its closing tag?
line 1: <h3>Cricket is fun.</h3>
line 2: <h1>Good morning!
line 3: <u>Fun facts</u> (a) line 2 (b) line 3 (c) line 1 - 29.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) editor (d) address
- 30.True or false: HTML on its own cannot make links to pages. (a) True (b) False
- 31.True or false: <br> is an empty tag. (a) True (b) False
- 32.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
-
33.🔍 One closing tag is missing. Which one?
<p>Cricket is fun.</p>
<strong>My pets</strong>
<small>I love mangoes. (a) </strong> (b) </p> (c) </small> (d) </h2> - 34.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) on the browser tab (d) at the bottom
-
35.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) Easy snacks (b) I like to read. (c) index.html (d) Space Facts - 36.Which of these is a closing tag? (a) <li> (b) <h1> (c) </h1> (d) <title>
- 37.Which of these is true of a web browser? (a) is where we type code (b) has an address bar (c) shows line numbers (d) answers page requests
- 38.True or false: <ol> goes inside ul or ol. (a) True (b) False
- 39.📝 What does <hr> draw? (a) a table (b) a line across the page (c) a link (d) a picture
-
40.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>My pets</p>
<p>Our school trip</p>
<p>Rain today</p> (a) Rain today (b) Our school trip (c) I love mangoes. (d) My pets
Answer key
- 4
- 4
- 1
- <h1>
- a slash /
- Language
- My Hobbies
- in a new tab
- Play games
- <a>
- False
- True
- False
- a web server
- <ol>
- opens it in a new tab
- 3
- <ol>
- <title>
- alt
- Map of India
- Yes
- Yes
- <h6>
- Yes
- False
- 5
- line 2
- element
- False
- True
- <ul>
- </small>
- on the browser tab
- Space Facts
- </h1>
- has an address bar
- False
- a line across the page
- I love mangoes.
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids