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 <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 2.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <title> (d) <img>
-
3.🔍 One closing tag is missing. Which one?
<i>My pets</i>
<u>Good morning!</u>
<h1>I love mangoes. (a) </p> (b) </u> (c) </i> (d) </h1> - 4.True or false: <ul> lists steps in order. (a) False (b) True
- 5.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h6>? (a) <h1> (b) <h5> (c) <h2> (d) <h6>
- 6.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) shows pages from the web (d) colours code to help us
-
7.🔠 How many headings are in this code?
<h1>My pets</h1>
<h4>Cricket is fun.</h4>
<p>Hello, world!</p>
<p>Cricket is fun.</p>
<h4>Our school trip</h4> -
8.🔍 Which line is missing its closing tag?
line 1: <strong>Our school trip</strong>
line 2: <u>The red kite
line 3: <p>I love mangoes.</p> (a) line 2 (b) line 1 (c) line 3 -
9.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets - 10.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) src (d) width
- 11.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
- 12.Which of these is true of a web server? (a) sends pages over the net (b) turns HTML into a page (c) shows pages from the web (d) has an address bar
- 13.True or false: <p> is an empty tag. (a) True (b) False
-
14.📋 What number does the browser show next to “Guava”?
<ol>
<li>Litchi</li>
<li>Orange</li>
<li>Banana</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Guava</li>
</ol> - 15.Which of these has a closing tag? (a) <input> (b) <h1> (c) <br> (d) <hr>
-
16.📋 What number does the browser show next to “Jamun”?
<ol start="2">
<li>Mango</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Orange</li>
<li>Banana</li>
<li>Guava</li>
</ol> -
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="50"> (a) The full moon (b) Our school bus (c) width (d) moon.png - 18.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 19.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) <strong> (c) <\strong> (d) </strong>
-
20.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h3>I love mangoes.</h3>
<p>The red kite</p> - 21.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h2> or <h6>? (a) <h5> (b) <h3> (c) <h2> (d) <h6>
-
22.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<!-- <p>My pets</p> --> -
23.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="250"> (a) cake.jpg (b) Birthday cake (c) moon.png (d) dog.jpg -
24.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow</p> -
25.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Planets</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Class 7 Blog (b) Planets (c) Here is my best one. (d) index.html - 26.💬 How does an HTML comment end? (a) >> (b) */ (c) --> (d) //
- 27.💬 How does an HTML comment start? (a) // (b) /* (c) # (d) <!--
-
28.🔗 Which address opens when you click this link?
<a href="maths.html">Take the quiz</a> (a) Take the quiz (b) maths.html (c) art.html (d) news.html -
29.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="250"> (a) width (b) bus.jpg (c) An old fort (d) Our school bus -
30.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>The red kite</p>
<!-- <p>Fun facts</p> --> (a) Hello, world! (b) The red kite (c) Fun facts -
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) width (b) Birthday cake (c) A happy dog (d) cake.jpg -
32.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Hello, world!</p>
<h4>Hello, world!</h4>
<h2>My pets</h2> - 33.True or false: <hr> has a closing tag. (a) True (b) False
- 34.Which of these is true of a web server? (a) hosts websites online (b) colours code to help us (c) saves our .html files (d) opens web pages for us
-
35.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Good morning!</p> --> - 36.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
- 37.True or false: in <img>, width tells which image to load. (a) False (b) True
- 38.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) element (d) address
-
39.🔗 Where does this link open?
<a href="news.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab -
40.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Hello, world!</p>
<!-- <p>Good morning!</p> -->
<!-- <p>My pets</p> -->
<!-- <p>I love mangoes.</p> -->
Answer key
- has a closing tag
- <img>
- </h1>
- False
- <h6>
- shows pages from the web
- 3
- line 2
- bullets
- src
- <ol>
- sends pages over the net
- False
- 6
- <h1>
- 3
- The full moon
- Yes
- </strong>
- 2
- <h2>
- 2
- cake.jpg
- 2
- Class 7 Blog
- -->
- <!--
- maths.html
- Our school bus
- Fun facts
- Birthday cake
- 3
- False
- hosts websites online
- 1
- True
- False
- element
- in a new tab
- 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids