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 is the odd one out? (a) saves our .html files (b) turns HTML into a page (c) shows pages from the web (d) has an address bar
- 2.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
- 3.🖼️ Which attribute of <img> describes the picture? (a) width (b) alt (c) src (d) height
- 4.🌐 Which one colours code to help us? (a) a code editor (b) a web server (c) a web browser
-
5.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>Fun facts</p> -->
<p>The red kite</p>
<p>I love mangoes.</p> - 6.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <meta charset="utf-8"> (d) <h1>
- 7.True or false: <input> has a closing tag. (a) False (b) True
- 8.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) element (d) address
-
9.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) body (c) Welcome! (d) Space Facts - 10.💬 How does an HTML comment start? (a) # (b) /* (c) <!-- (d) //
-
11.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>I like to read.</p>
</body>
</html> (a) body (b) I like to read. (c) My Hobbies (d) All about me -
12.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="200"> (a) width (b) An old fort (c) Our school bus (d) bus.jpg -
13.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Match report</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Match report (b) Here is my best one. (c) My Hobbies (d) index.html - 14.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
- 15.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
16.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Match report</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Space Facts (b) index.html (c) We won by 5 runs. (d) Match report -
17.🔍 One closing tag is missing. Which one?
<small>The red kite
<i>I love mangoes.</i>
<h1>My best friend</h1> (a) </h1> (b) </small> (c) </i> (d) </p> -
18.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="100"> - 19.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h6> or <h1>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
- 20.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
- 21.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h1> or <h2>? (a) <h4> (b) <h1> (c) <h2> (d) <h6>
-
22.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="150"> (a) dog.jpg (b) bus.jpg (c) A happy dog (d) moon.png - 23.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 24.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 25.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a new line (c) as 5 spaces (d) as a dot
-
26.🔗 Which address opens when you click this link?
<a href="about.html">Play games</a> (a) contact.html (b) about.html (c) Play games (d) https://example.com -
27.🔍 One closing tag is missing. Which one?
<em>The red kite</em>
<h1>I love mangoes.</h1>
<small>Cricket is fun. (a) </h1> (b) </strong> (c) </small> (d) </em> - 28.True or false: in <img>, src is read by screen readers. (a) True (b) False
-
29.🔗 Which address opens when you click this link?
<a href="quiz.html">Play games</a> (a) games.html (b) about.html (c) Play games (d) quiz.html - 30.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) has an address bar (d) hosts websites online
- 31.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 10 (d) 3
-
32.🔗 Where does this link open?
<a href="news.html">Maths fun</a> (a) in a new tab (b) in the same tab -
33.🔗 Where does this link open?
<a href="contact.html" target="_blank">Visit the site</a> (a) in the same tab (b) in a new tab - 34.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) width (c) height (d) alt
- 35.💬 Why do coders write comments? (a) to leave notes (b) to add colour (c) to show pictures (d) to make links
-
36.🔗 Where does this link open?
<a href="about.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab -
37.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Hello, world!</p>
<h2>The red kite</h2> - 38.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) nowhere (d) in a big heading
- 39.🌐 Which one answers page requests? (a) a web browser (b) a code editor (c) a web server
-
40.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p>
<p>Rain today</p> (a) Rain today (b) Hello, world! (c) Good morning!
Answer key
- saves our .html files
- <a>
- alt
- a code editor
- 2
- <h1>
- False
- element
- Welcome!
- <!--
- All about me
- Our school bus
- My Hobbies
- <ol>
- has a closing tag
- Space Facts
- </small>
- 100
- <h1>
- src
- <h6>
- dog.jpg
- in the head
- a closing tag
- as one space
- about.html
- </small>
- False
- quiz.html
- hosts websites online
- 6
- in the same tab
- in a new tab
- width
- to leave notes
- in a new tab
- 2
- on the browser tab
- a web server
- Hello, world!
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids