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 heading shows the SMALLEST text: <h5>, <h2>, <h4> or <h1>? (a) <h5> (b) <h1> (c) <h4> (d) <h2>
- 2.Which of these is an opening tag? (a) </p> (b) </li> (c) <title> (d) </title>
- 3.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) editor (c) attribute (d) address
- 4.True or false: <li> goes inside ul or ol. (a) False (b) True
- 5.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <h1> (d) <p>
- 6.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
- 7.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h6> or <h1>? (a) <h1> (b) <h4> (c) <h2> (d) <h6>
- 8.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h2>? (a) <h2> (b) <h5> (c) <h4> (d) <h6>
- 9.🖼️ Which attribute of <img> names the picture file? (a) alt (b) src (c) width (d) height
- 10.True or false: <ol> is an ordered list. (a) False (b) True
-
11.🔗 Which words do you click on?
<a href="news.html">Visit the site</a> (a) news.html (b) Visit the site (c) href (d) Maths fun - 12.Which of these is a closing tag? (a) <title> (b) <body> (c) <b> (d) </b>
- 13.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) alt (c) src (d) width
-
14.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Fun facts</p>
<h4>The red kite</h4>
<p>I love mangoes.</p>
<p>Hello, world!</p> -
15.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Fun facts</p>
<p>The red kite</p>
<p>My pets</p> -
16.🔍 One closing tag is missing. Which one?
<p>My best friend</p>
<h2>Fun facts</h2>
<strong>Our school trip (a) </i> (b) </h2> (c) </p> (d) </strong> - 17.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
- 18.Which of these is an empty tag? (a) <title> (b) <p> (c) <b> (d) <input>
- 19.True or false: <ul> goes inside ul or ol. (a) False (b) True
-
20.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) Class 7 Blog (c) My drawings (d) body -
21.📋 What number does the browser show next to “Banana”?
<ol start="7">
<li>Papaya</li>
<li>Grapes</li>
<li>Banana</li>
</ol> - 22.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
- 23.Which of these is true of a web browser? (a) answers page requests (b) saves our .html files (c) shows line numbers (d) turns HTML into a page
- 24.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </html> (c) <html> (d) <head>
-
25.🔗 Which words do you click on?
<a href="news.html">Art corner</a> (a) href (b) news.html (c) School news (d) Art corner - 26.🔢 In a basic web page file, which comes first: “</body>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </body>
- 27.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
- 28.Which of these is a closing tag? (a) <b> (b) <li> (c) <body> (d) </body>
- 29.💬 How does an HTML comment end? (a) */ (b) // (c) --> (d) >>
-
30.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Good morning!</p>
<p>Good morning!</p>
<h4>My pets</h4>
<p>Good morning!</p> - 31.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
- 32.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h4> or <h5>? (a) <h4> (b) <h1> (c) <h3> (d) <h5>
-
33.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Banana</li>
<li>Grapes</li>
<li>Papaya</li>
</ul> -
34.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="100"> (a) Map of India (b) map.png (c) Birthday cake (d) width - 35.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) alt (d) src
- 36.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
-
37.🔗 Which address opens when you click this link?
<a href="contact.html">About us</a> (a) https://example.com (b) About us (c) maths.html (d) contact.html -
38.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="350"> (a) moon.png (b) The full moon (c) width (d) Our school bus - 39.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) id (d) href
-
40.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>My best friend</p> -->
<p>Hello, world!</p>
<p>Fun facts</p>
Answer key
- <h5>
- <title>
- element
- True
- <h1>
- to leave notes
- <h1>
- <h2>
- src
- True
- Visit the site
- </b>
- alt
- 2
- 1
- </strong>
- Yes
- <input>
- False
- My drawings
- 9
- <ol>
- turns HTML into a page
- </html>
- Art corner
- <!DOCTYPE html>
- <!DOCTYPE html>
- </body>
- -->
- 2
- <ul>
- <h5>
- 4
- Map of India
- width
- in the head
- contact.html
- The full moon
- href
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids