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 list tag is one item of a list? (a) <ol> (b) <ul> (c) <li>
- 2.True or false: <img> goes in the body. (a) True (b) False
- 3.🏷️ Which is the closing tag for <b>? (a) <b> (b) <b/> (c) </b> (d) <\b>
-
4.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>Try this poha.</p>
</body>
</html> (a) index.html (b) Riya’s Recipes (c) Match report (d) Try this poha. - 5.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2/> (c) </h2> (d) <h2>
- 6.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h1>? (a) <h3> (b) <h2> (c) <h4> (d) <h1>
- 7.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
8.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Rain today</p>
<p>My pets</p> - 9.🔍 Which is the odd one out? (a) turns HTML into a page (b) colours code to help us (c) saves our .html files (d) is where we type code
- 10.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as one space (c) as a dot (d) as 5 spaces
-
11.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h3>Rain today</h3>
<h2>Cricket is fun.</h2>
<p>Our school trip</p> - 12.Which of these is a closing tag? (a) <p> (b) </body> (c) <body> (d) <h1>
- 13.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <br> (c) <ul> (d) <hr>
- 14.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
- 15.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h3> or <h5>? (a) <h4> (b) <h6> (c) <h5> (d) <h3>
- 16.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) src (d) id
- 17.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h6>? (a) <h2> (b) <h6> (c) <h1> (d) <h4>
-
18.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) dog.jpg (b) A happy dog (c) bus.jpg (d) moon.png - 19.True or false: a web server is where we type code. (a) False (b) True
-
20.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) kite.png (b) A tiger asleep (c) tiger.jpg (d) map.png - 21.💬 How does an HTML comment start? (a) // (b) /* (c) # (d) <!--
-
22.🔍 One closing tag is missing. Which one?
<h3>Rain today</h3>
<em>Our school trip</em>
<p>My best friend (a) </h3> (b) </em> (c) </u> (d) </p> - 23.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h5> or <h6>? (a) <h5> (b) <h1> (c) <h6> (d) <h3>
-
24.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p>
<!-- <p>The red kite</p> --> - 25.📝 What does <p> make? (a) a table (b) a link (c) a picture (d) a paragraph
-
26.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Welcome! (b) Space Facts (c) We won by 5 runs. (d) body -
27.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>My pets</p> -->
<p>Our school trip</p> (a) Our school trip (b) I love mangoes. (c) My pets - 28.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h6> or <h4>? (a) <h2> (b) <h6> (c) <h5> (d) <h4>
- 29.Which of these is true of a web browser? (a) sends pages over the net (b) saves our .html files (c) answers page requests (d) opens web pages for us
-
30.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>My best friend</p>
<!-- <p>My pets</p> --> (a) I love mangoes. (b) My best friend (c) My pets -
31.🔍 One closing tag is missing. Which one?
<strong>My best friend</strong>
<h2>My pets</h2>
<i>Fun facts (a) </i> (b) </strong> (c) </h1> (d) </h2> -
32.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>My best friend</p>
<h2>My best friend</h2>
<p>I love mangoes.</p> - 33.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 34.True or false: <ul> shows 1, 2, 3 numbers. (a) True (b) False
-
35.🔍 One closing tag is missing. Which one?
<b>Fun facts
<em>I love mangoes.</em>
<h3>Cricket is fun.</h3> (a) </em> (b) </h1> (c) </b> (d) </h3> - 36.Which of these goes in the head? (a) <p> (b) <h1> (c) <meta charset="utf-8"> (d) <img>
-
37.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Match report</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Cricket Club (b) Match report (c) body (d) Here is my best one. -
38.🔗 Which address opens when you click this link?
<a href="games.html">Visit the site</a> (a) Visit the site (b) about.html (c) games.html (d) contact.html -
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="300"> (a) Our school bus (b) width (c) An old fort (d) bus.jpg - 40.Which of these is an opening tag? (a) </body> (b) <li> (c) </h1> (d) </title>
Answer key
- <li>
- True
- </b>
- Riya’s Recipes
- </h2>
- <h1>
- an opening tag
- 1
- turns HTML into a page
- as one space
- 3
- </body>
- <ol>
- <ul>
- <h6>
- href
- <h1>
- dog.jpg
- False
- tiger.jpg
- <!--
- </p>
- <h1>
- 2
- a paragraph
- Welcome!
- My pets
- <h6>
- opens web pages for us
- My pets
- </i>
- 2
- has a closing tag
- False
- </b>
- <meta charset="utf-8">
- Match report
- games.html
- Our school bus
- <li>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids