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.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Sky is blue<br>Kites fly high</p> - 2.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 3.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 4.📝 What does <p> make? (a) a picture (b) a link (c) a paragraph (d) a table
- 5.True or false: a web server answers page requests. (a) True (b) False
- 6.🖼️ Which attribute of <img> names the picture file? (a) alt (b) width (c) src (d) height
- 7.True or false: HTML on its own can add up two numbers. (a) False (b) True
-
8.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p> -
9.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h4>Good morning!</h4>
<h3>My pets</h3> - 10.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 11.Which of these is true of a code editor? (a) opens web pages for us (b) shows pages from the web (c) colours code to help us (d) hosts websites online
-
12.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Planets</h1>
<p>Try this poha.</p>
</body>
</html> (a) body (b) Try this poha. (c) Planets (d) Riya’s Recipes - 13.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <h1> (d) <p>
- 14.Which of these is an opening tag? (a) </title> (b) </b> (c) </li> (d) <p>
-
15.🔗 Which address opens when you click this link?
<a href="quiz.html">Contact us</a> (a) about.html (b) Contact us (c) quiz.html (d) games.html -
16.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Mango</li>
<li>Litchi</li>
</ul> -
17.🔍 Which line is missing its closing tag?
line 1: <h1>Hello, world!</h1>
line 2: <strong>I love mangoes.</strong>
line 3: <p>Cricket is fun. (a) line 1 (b) line 2 (c) line 3 - 18.Which of these has a closing tag? (a) <p> (b) <input> (c) <meta> (d) <br>
- 19.🔗 What does HyperText mean? (a) text with links (b) very big text (c) secret text (d) text in colour
-
20.🔗 Which address opens when you click this link?
<a href="games.html">Contact us</a> (a) Contact us (b) about.html (c) contact.html (d) games.html - 21.🔍 Which is the odd one out? (a) hosts websites online (b) sends pages over the net (c) saves our .html files (d) stores a website’s files
-
22.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>Rain today</p>
<h2>My pets</h2>
<p>Cricket is fun.</p>
<p>Good morning!</p>
<h2>Our school trip</h2> - 23.True or false: HTML on its own can keep a high score. (a) True (b) False
-
24.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Our school trip</p> --> - 25.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
- 26.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) src (d) height
-
27.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Good morning!</p>
<h4>I love mangoes.</h4> - 28.Which of these is a closing tag? (a) <li> (b) </p> (c) <h1> (d) <p>
- 29.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) attribute (d) element
-
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="200"> (a) Map of India (b) kite.png (c) width (d) A red kite -
31.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Fun facts</p>
<p>Hello, world!</p>
<p>My pets</p> (a) Fun facts (b) My pets (c) Hello, world! (d) My best friend - 32.True or false: HTML on its own can make a form. (a) False (b) True
-
33.🔍 One closing tag is missing. Which one?
<small>My best friend
<h1>I love mangoes.</h1>
<em>Fun facts</em> (a) </em> (b) </h1> (c) </h3> (d) </small> - 34.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) stores a website’s files (d) colours code to help us
-
35.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Visit the site</a> (a) in the same tab (b) in a new tab - 36.🔢 In a basic web page file, which comes first: “<head>” or “<body>”? (a) <head> (b) <body>
- 37.🔢 In a basic web page file, which comes LAST? (a) <body> (b) </body> (c) </html> (d) <html>
-
38.🔍 Which line is missing its closing tag?
line 1: <i>My best friend</i>
line 2: <p>Fun facts</p>
line 3: <b>The red kite (a) line 1 (b) line 3 (c) line 2 - 39.True or false: HTML on its own cannot make tables. (a) True (b) False
- 40.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
Answer key
- 3
- in the body
- an opening tag
- a paragraph
- True
- src
- False
- 2
- 3
- an empty tag
- colours code to help us
- Planets
- <h1>
- <p>
- quiz.html
- 3
- line 3
- <p>
- text with links
- games.html
- saves our .html files
- 4
- False
- 2
- <img>
- src
- 2
- </p>
- element
- A red kite
- My best friend
- True
- </small>
- stores a website’s files
- in a new tab
- <head>
- </html>
- line 3
- False
- <ol>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids