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.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 2.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h5> or <h6>? (a) <h6> (b) <h5> (c) <h1> (d) <h3>
- 3.True or false: a code editor shows line numbers. (a) True (b) False
- 4.Which of these is a closing tag? (a) <title> (b) </body> (c) <p> (d) <li>
- 5.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <table> (c) <meta charset="utf-8"> (d) <title>
- 6.Which of these is an empty tag? (a) <title> (b) <input> (c) <ul> (d) <p>
-
7.🔗 Which address opens when you click this link?
<a href="quiz.html">Take the quiz</a> (a) Take the quiz (b) games.html (c) about.html (d) quiz.html - 8.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h6> or <h3>? (a) <h3> (b) <h1> (c) <h6> (d) <h4>
- 9.Which of these is an opening tag? (a) </b> (b) </p> (c) </h1> (d) <h1>
-
10.🔗 Which address opens when you click this link?
<a href="quiz.html">About us</a> (a) quiz.html (b) about.html (c) About us (d) games.html -
11.🔍 One closing tag is missing. Which one?
<strong>Our school trip</strong>
<h3>Cricket is fun.
<p>Fun facts</p> (a) </h3> (b) </h2> (c) </strong> (d) </p> -
12.🔍 Which line is missing its closing tag?
line 1: <strong>Our school trip</strong>
line 2: <small>The red kite</small>
line 3: <h3>Hello, world! (a) line 1 (b) line 3 (c) line 2 - 13.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
- 14.True or false: in <img>, alt is read by screen readers. (a) True (b) False
- 15.Which of these is an opening tag? (a) <body> (b) </b> (c) </p> (d) </title>
- 16.🔗 What does HyperText mean? (a) very big text (b) text in colour (c) secret text (d) text with links
- 17.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
- 18.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 19.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to load it faster (c) to colour it (d) to make it bigger
- 20.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the doctype (d) the head
- 21.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h3> or <h5>? (a) <h6> (b) <h5> (c) <h3> (d) <h4>
-
22.📄 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>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) index.html (c) Riya’s Recipes (d) Match report - 23.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
24.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) width (b) The full moon (c) A happy dog (d) dog.jpg - 25.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 26.📄 Can HTML on its own keep a high score? (a) Yes (b) No
- 27.🔢 In a basic web page file, which comes first: “<head>” or “<html>”? (a) <html> (b) <head>
- 28.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 29.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
30.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> (a) kite.png (b) A tiger asleep (c) map.png (d) tiger.jpg - 31.True or false: HTML on its own cannot make headings. (a) False (b) True
- 32.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 33.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <ul> (d) <br>
- 34.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h5>? (a) <h2> (b) <h4> (c) <h5> (d) <h3>
- 35.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <link about.html>
- 36.True or false: in <img>, alt tells which image to load. (a) True (b) False
-
37.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="400"> (a) Birthday cake (b) width (c) Map of India (d) map.png -
38.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>My best friend</p>
<p>Cricket is fun.</p>
<p>My pets</p> -
39.🔍 One closing tag is missing. Which one?
<i>Cricket is fun.</i>
<h1>Rain today</h1>
<u>My pets (a) </u> (b) </i> (c) </h3> (d) </h1> - 40.Which of these is true of a code editor? (a) opens web pages for us (b) saves our .html files (c) stores a website’s files (d) shows pages from the web
Answer key
- in the head
- <h1>
- True
- </body>
- <table>
- <input>
- quiz.html
- <h1>
- <h1>
- quiz.html
- </h3>
- line 3
- False
- True
- <body>
- text with links
- <ul>
- has a closing tag
- to describe the image
- the body
- <h3>
- Riya’s Recipes
- an empty tag
- A happy dog
- Yes
- No
- <html>
- No
- Yes
- tiger.jpg
- False
- an opening tag
- <ol>
- <h2>
- <a href="about.html">
- False
- Map of India
- 1
- </u>
- saves our .html files
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids