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.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>My pets</p>
<p>I love mangoes.</p>
<p>My best friend</p> (a) My best friend (b) My pets (c) I love mangoes. (d) Hello, world! - 2.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
- 3.True or false: <li> is an empty tag. (a) True (b) False
-
4.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="400"> (a) Our school bus (b) An old fort (c) width (d) bus.jpg - 5.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h3>? (a) <h5> (b) <h6> (c) <h4> (d) <h3>
- 6.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
7.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="50"> (a) moon.png (b) The full moon (c) fort.jpg (d) bus.jpg -
8.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Hello, world!</p>
<p>Rain today</p> (a) Rain today (b) Hello, world! (c) My best friend -
9.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p>
<p>The red kite</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) The red kite (c) Rain today (d) Cricket is fun. -
10.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) dog.jpg (b) width (c) A happy dog (d) The full moon -
11.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>The red kite</h2>
<p>Rain today</p>
<p>I love mangoes.</p> - 12.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h5> or <h2>? (a) <h4> (b) <h5> (c) <h6> (d) <h2>
- 13.True or false: in <img>, width names the picture file. (a) False (b) True
- 14.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h1>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>
- 15.True or false: <h1> has a closing tag. (a) False (b) True
- 16.💬 How does an HTML comment start? (a) // (b) /* (c) <!-- (d) #
- 17.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <title> (d) <p>
- 18.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h1>? (a) <h1> (b) <h5> (c) <h2> (d) <h4>
- 19.True or false: <li> is an unordered list. (a) True (b) False
-
20.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p>
<p>Good morning!</p> (a) Cricket is fun. (b) I love mangoes. (c) Good morning! -
21.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h3>My best friend</h3>
<p>The red kite</p> - 22.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 23.Which of these goes in the head? (a) <h1> (b) <p> (c) <title> (d) <img>
-
24.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="300"> -
25.🔗 Which words do you click on?
<a href="quiz.html">Maths fun</a> (a) Art corner (b) href (c) Maths fun (d) quiz.html -
26.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Grapes</li>
</ol> -
27.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="300"> - 28.🔢 In a basic web page file, which comes first: “</html>” or “</head>”? (a) </head> (b) </html>
-
29.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>The red kite</p>
<p>I love mangoes.</p> -
30.🔍 One closing tag is missing. Which one?
<h2>I love mangoes.
<i>Good morning!</i>
<b>My best friend</b> (a) </b> (b) </h2> (c) </i> (d) </small> -
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="100"> (a) Birthday cake (b) width (c) Map of India (d) map.png -
32.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>Cricket is fun.</h2>
<p>My pets</p>
<p>My best friend</p>
<p>My best friend</p>
<p>My best friend</p> -
33.🔗 Which words do you click on?
<a href="contact.html">Contact us</a> (a) href (b) Visit the site (c) contact.html (d) Contact us -
34.🔗 Where does this link open?
<a href="maths.html">Play games</a> (a) in a new tab (b) in the same tab -
35.🔍 Which line is missing its closing tag?
line 1: <h2>Our school trip
line 2: <p>My pets</p>
line 3: <u>Good morning!</u> (a) line 1 (b) line 2 (c) line 3 -
36.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) Riya’s Recipes (b) body (c) I like to read. (d) Planets - 37.Which of these goes in the head? (a) <table> (b) <ul> (c) <h1> (d) <style>
-
38.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>I love mangoes.</p>
<p>My pets</p>
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> --> -
39.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>Good morning!</h2>
<p>Hello, world!</p>
<h2>My best friend</h2>
<h2>My pets</h2>
<h2>My pets</h2> -
40.🔍 One closing tag is missing. Which one?
<i>My best friend</i>
<h1>Rain today
<strong>Cricket is fun.</strong> (a) </h1> (b) </strong> (c) </h2> (d) </i>
Answer key
- Hello, world!
- a web browser
- False
- Our school bus
- <h3>
- an opening tag
- moon.png
- My best friend
- Rain today
- A happy dog
- 3
- <h2>
- False
- <h1>
- True
- <!--
- <p>
- <h1>
- False
- I love mangoes.
- 2
- an opening tag
- <title>
- 300
- Maths fun
- 2
- 300
- </head>
- 3
- </h2>
- Map of India
- 5
- Contact us
- in the same tab
- line 1
- Planets
- <style>
- 4
- 2
- </h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids