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.True or false: <style> goes in the body. (a) False (b) True
- 2.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h1> or <h2>? (a) <h4> (b) <h1> (c) <h2> (d) <h5>
- 3.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <title> (d) <ul>
-
4.🔍 One closing tag is missing. Which one?
<small>Cricket is fun.</small>
<h1>Fun facts
<p>My pets</p> (a) </h2> (b) </small> (c) </h1> (d) </p> -
5.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>My pets</p>
<p>Cricket is fun.</p>
<p>Our school trip</p>
<p>I love mangoes.</p> - 6.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h1> (d) <h6>
- 7.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
- 8.🔢 In a basic web page file, which comes LAST? (a) </body> (b) <!DOCTYPE html> (c) </html> (d) <html>
- 9.🔍 Which is the odd one out? (a) colours code to help us (b) opens web pages for us (c) shows line numbers (d) saves our .html files
- 10.True or false: <ol> shows bullet points. (a) True (b) False
- 11.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
-
12.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="350"> (a) width (b) A happy dog (c) Birthday cake (d) cake.jpg - 13.Which of these is an opening tag? (a) </p> (b) <p> (c) </title> (d) </body>
- 14.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
-
15.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Mango</li>
</ol> (a) bullets (b) numbers - 16.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h5> or <h2>? (a) <h5> (b) <h4> (c) <h2> (d) <h6>
-
17.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Rain today</p>
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p> (a) My best friend (b) Cricket is fun. (c) The red kite (d) Rain today - 18.True or false: <ul> is an unordered list. (a) False (b) True
- 19.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h6> or <h2>? (a) <h1> (b) <h6> (c) <h2> (d) <h4>
- 20.Which of these goes in the head? (a) <h1> (b) <img> (c) <ul> (d) <meta charset="utf-8">
-
21.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) A tiger asleep (b) kite.png (c) tiger.jpg (d) map.png -
22.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> --> -
23.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) Riya’s Recipes (c) index.html (d) Welcome! - 24.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 25.Which of these is an empty tag? (a) <meta> (b) <h1> (c) <title> (d) <ul>
-
26.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>Fun facts</p>
<!-- <p>Our school trip</p> -->
<p>My pets</p> (a) Fun facts (b) Hello, world! (c) My pets (d) Our school trip - 27.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 4 (d) 3
- 28.🔤 In “HTML”, what does the L stand for? (a) Link (b) Laptop (c) Line (d) Language
-
29.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) Birthday cake (b) cake.jpg (c) width (d) A happy dog - 30.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
-
31.🔗 Where does this link open?
<a href="contact.html" target="_blank">Take the quiz</a> (a) in the same tab (b) in a new tab - 32.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h6>? (a) <h1> (b) <h4> (c) <h6> (d) <h3>
-
33.🔗 Which address opens when you click this link?
<a href="quiz.html">Maths fun</a> (a) about.html (b) quiz.html (c) Maths fun (d) games.html -
34.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="150"> - 35.Which of these is true of a code editor? (a) hosts websites online (b) opens web pages for us (c) saves our .html files (d) answers page requests
- 36.True or false: HTML on its own can keep a high score. (a) True (b) False
-
37.🔍 One closing tag is missing. Which one?
<h3>My best friend
<em>I love mangoes.</em>
<u>Hello, world!</u> (a) </u> (b) </b> (c) </h3> (d) </em> -
38.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="400"> -
39.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> -
40.🔗 Which address opens when you click this link?
<a href="about.html">Contact us</a> (a) about.html (b) contact.html (c) https://example.com (d) Contact us
Answer key
- False
- <h5>
- <ul>
- </h1>
- 5
- <h6>
- <a>
- </html>
- opens web pages for us
- False
- <h6>
- Birthday cake
- <p>
- in the head
- numbers
- <h6>
- The red kite
- True
- <h1>
- <meta charset="utf-8">
- tiger.jpg
- 1
- Riya’s Recipes
- an empty tag
- <meta>
- Our school trip
- 6
- Language
- Birthday cake
- <ul>
- in a new tab
- <h6>
- quiz.html
- 150
- saves our .html files
- False
- </h3>
- 400
- 200
- about.html
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids