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 the text of <title> appear? (a) in a big heading (b) at the bottom (c) on the browser tab (d) nowhere
-
2.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Our school trip</p> -->
<p>Hello, world!</p>
<p>Good morning!</p> (a) The red kite (b) Our school trip (c) Hello, world! (d) Good morning! - 3.💬 How does an HTML comment end? (a) >> (b) */ (c) // (d) -->
- 4.True or false: in <img>, alt shows if the image fails. (a) True (b) False
-
5.🔗 Which address opens when you click this link?
<a href="about.html">School news</a> (a) https://example.com (b) School news (c) about.html (d) contact.html - 6.Which of these has a closing tag? (a) <br> (b) <input> (c) <img> (d) <b>
-
7.🔗 Which address opens when you click this link?
<a href="games.html">Maths fun</a> (a) about.html (b) games.html (c) Maths fun (d) contact.html - 8.True or false: in <img>, alt describes the picture. (a) False (b) True
-
9.🔗 Which words do you click on?
<a href="quiz.html">School news</a> (a) quiz.html (b) href (c) School news (d) Take the quiz - 10.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <ol> (d) <hr>
- 11.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ol> (d) <ul>
-
12.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>My best friend</p> -->
<!-- <p>My pets</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p> -
13.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Roses are red<br>Stars shine<br>Birds sing</p> -
14.🔗 Where does this link open?
<a href="quiz.html">Take the quiz</a> (a) in the same tab (b) in a new tab - 15.Which of these is a closing tag? (a) <body> (b) </h1> (c) <li> (d) <h1>
- 16.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
- 17.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 18.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 19.💾 A web page file usually ends with which extension? (a) .html (b) .mp3 (c) .txt (d) .png
- 20.True or false: <h1> is an empty tag. (a) False (b) True
-
21.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="400"> (a) A red kite (b) cake.jpg (c) map.png (d) kite.png - 22.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h6> or <h3>? (a) <h2> (b) <h3> (c) <h4> (d) <h6>
-
23.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="150"> (a) width (b) An old fort (c) bus.jpg (d) Our school bus - 24.True or false: HTML on its own can count button clicks. (a) False (b) True
- 25.📝 What do we need to write HTML? (a) a plain text editor (b) a paintbrush (c) a microphone (d) a printer
- 26.Which of these is true of a web browser? (a) saves our .html files (b) is where we type code (c) opens web pages for us (d) stores a website’s files
-
27.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Planets</h1>
<p>Mars is red.</p>
</body>
</html> (a) Planets (b) Mars is red. (c) index.html (d) My Hobbies - 28.Which of these is an opening tag? (a) </title> (b) </h1> (c) </b> (d) <title>
- 29.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
-
30.🔍 One closing tag is missing. Which one?
<h2>The red kite</h2>
<strong>Hello, world!</strong>
<i>Fun facts (a) </strong> (b) </h2> (c) </p> (d) </i> - 31.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) address (c) editor (d) attribute
- 32.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
- 33.💬 Does the browser show comments on the page? (a) Yes (b) No
-
34.🔍 Which line is missing its closing tag?
line 1: <i>My best friend</i>
line 2: <strong>The red kite
line 3: <small>Our school trip</small> (a) line 2 (b) line 3 (c) line 1 -
35.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Good morning!</p>
<p>Cricket is fun.</p> (a) The red kite (b) Cricket is fun. (c) Good morning! - 36.Which of these goes in the head? (a) <a> (b) <ul> (c) <img> (d) <link rel="stylesheet">
-
37.🔍 One closing tag is missing. Which one?
<u>My pets
<strong>Fun facts</strong>
<h1>The red kite</h1> (a) </strong> (b) </i> (c) </h1> (d) </u> -
38.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Fun facts</p>
<h2>Our school trip</h2>
<h4>Rain today</h4>
<p>Our school trip</p> - 39.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <link> (d) <p>
-
40.🔗 Which address opens when you click this link?
<a href="https://example.com">School news</a> (a) maths.html (b) https://example.com (c) School news (d) art.html
Answer key
- on the browser tab
- Our school trip
- -->
- True
- about.html
- <b>
- games.html
- True
- School news
- <ul>
- <li>
- 1
- 4
- in the same tab
- </h1>
- <a href="about.html">
- an opening tag
- an opening tag
- .html
- False
- kite.png
- <h2>
- Our school bus
- False
- a plain text editor
- opens web pages for us
- My Hobbies
- <title>
- a web browser
- </i>
- element
- <li>
- No
- line 2
- The red kite
- <link rel="stylesheet">
- </u>
- 3
- <a>
- https://example.com
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids