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 of these is an opening tag? (a) </li> (b) <b> (c) </p> (d) </h1>
- 2.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 3 (d) 4
- 3.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) height (c) src (d) width
- 4.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
- 5.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a slash / (d) a dot .
- 6.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <img> (d) <pic>
- 7.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) editor (d) address
- 8.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
- 9.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) Home Text (c) Hot Tags (d) High Tech
- 10.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <hr> (d) <ul>
- 11.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
- 12.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
-
13.🔍 One closing tag is missing. Which one?
<small>Rain today</small>
<i>Good morning!
<strong>My best friend</strong> (a) </i> (b) </strong> (c) </em> (d) </small> -
14.🔗 Where does this link open?
<a href="news.html">Maths fun</a> (a) in a new tab (b) in the same tab -
15.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>The red kite</p>
<!-- <p>Our school trip</p> --> - 16.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
17.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow</p> - 18.Which of these is an opening tag? (a) </title> (b) </h1> (c) </li> (d) <title>
-
19.🔗 Which address opens when you click this link?
<a href="news.html">Contact us</a> (a) quiz.html (b) games.html (c) Contact us (d) news.html -
20.🔗 Where does this link open?
<a href="contact.html" target="_blank">About us</a> (a) in a new tab (b) in the same tab - 21.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
-
22.🔍 One closing tag is missing. Which one?
<i>I love mangoes.
<b>My best friend</b>
<strong>Hello, world!</strong> (a) </strong> (b) </i> (c) </b> (d) </h1> - 23.True or false: <li> is an ordered list. (a) True (b) False
-
24.🔗 Which words do you click on?
<a href="https://example.com">Contact us</a> (a) https://example.com (b) href (c) Contact us (d) Visit the site -
25.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Jamun</li>
<li>Mango</li>
</ul> (a) numbers (b) bullets - 26.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h4> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
-
27.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>My best friend</p>
<p>Rain today</p>
<p>Good morning!</p>
<p>Hello, world!</p> - 28.Which of these is a closing tag? (a) <li> (b) <body> (c) <title> (d) </li>
- 29.🏷️ Which is the closing tag for <em>? (a) <em/> (b) <\em> (c) </em> (d) <em>
- 30.🧱 HTML gives a web page its ___. (a) speed (b) structure (c) sound (d) colours
-
31.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Planets</h1>
<p>Try this poha.</p>
</body>
</html> (a) Planets (b) index.html (c) Art Gallery (d) Try this poha. - 32.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
-
33.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Good morning!</p> -->
<p>Fun facts</p> -
34.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Cricket Club (b) index.html (c) Easy snacks (d) Here is my best one. - 35.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
-
36.📋 What number does the browser show next to “Banana”?
<ol start="8">
<li>Mango</li>
<li>Banana</li>
<li>Guava</li>
<li>Papaya</li>
<li>Orange</li>
</ol> -
37.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Mango</li>
<li>Guava</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Litchi</li>
</ol> - 38.🔍 Which is the odd one out? (a) shows line numbers (b) turns HTML into a page (c) shows pages from the web (d) has an address bar
-
39.🔗 Which words do you click on?
<a href="art.html">Maths fun</a> (a) href (b) art.html (c) Art corner (d) Maths fun - 40.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
Answer key
- <b>
- 6
- height
- <!--
- a slash /
- <img>
- element
- in the body
- HyperText
- <ul>
- the body
- <ol>
- </i>
- in the same tab
- 2
- No
- 2
- <title>
- news.html
- in a new tab
- <ol>
- </i>
- False
- Contact us
- bullets
- <h5>
- 4
- </li>
- </em>
- structure
- Art Gallery
- on the browser tab
- 2
- Cricket Club
- href
- 9
- 4
- shows line numbers
- Maths fun
- -->
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids