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.🔍 One closing tag is missing. Which one?
<small>Fun facts</small>
<h3>My pets</h3>
<h1>Good morning! (a) </p> (b) </h3> (c) </small> (d) </h1> - 2.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ul> (d) <ol>
- 3.🖼️ Which attribute of <img> describes the picture? (a) alt (b) width (c) height (d) src
- 4.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h3> or <h6>? (a) <h4> (b) <h6> (c) <h2> (d) <h3>
-
5.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Jamun</li>
</ul> (a) bullets (b) numbers - 6.🔢 In a basic web page file, which comes first: “</head>” or “<head>”? (a) </head> (b) <head>
-
7.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Mango</li>
</ol> - 8.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
- 9.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) <html> (c) <!DOCTYPE html> (d) </html>
-
10.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h3>Hello, world!</h3>
<h3>Good morning!</h3>
<h4>Fun facts</h4> - 11.🔍 Which is the odd one out? (a) stores a website’s files (b) shows pages from the web (c) turns HTML into a page (d) opens web pages for us
-
12.🔍 One closing tag is missing. Which one?
<h3>Cricket is fun.</h3>
<h2>My pets</h2>
<strong>Fun facts (a) </h3> (b) </p> (c) </h2> (d) </strong> - 13.True or false: HTML on its own can count button clicks. (a) False (b) True
- 14.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 15.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
- 16.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <h2> (c) <\h2> (d) <h2/>
-
17.🔍 One closing tag is missing. Which one?
<small>The red kite
<strong>I love mangoes.</strong>
<h1>Our school trip</h1> (a) </small> (b) </em> (c) </h1> (d) </strong> - 18.Which of these goes in the body? (a) <img> (b) <link rel="stylesheet"> (c) <style> (d) <title>
-
19.🔗 Where does this link open?
<a href="https://example.com">Visit the site</a> (a) in a new tab (b) in the same tab -
20.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Match report</h1>
<p>Here is my best one.</p>
</body>
</html> (a) index.html (b) Here is my best one. (c) Match report (d) Cricket Club -
21.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>My pets</h2>
<h2>Good morning!</h2>
<h2>Good morning!</h2> -
22.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="400"> (a) fort.jpg (b) The full moon (c) moon.png (d) bus.jpg - 23.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) starts a new line (d) makes a list
-
24.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Grapes</li>
</ul> (a) bullets (b) numbers -
25.🔗 Which address opens when you click this link?
<a href="news.html">School news</a> (a) games.html (b) School news (c) quiz.html (d) news.html -
26.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="400"> - 27.True or false: <input> has a closing tag. (a) True (b) False
- 28.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
29.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) tiger.jpg (b) A red kite (c) A tiger asleep (d) width - 30.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
31.🔗 Which words do you click on?
<a href="news.html">Contact us</a> (a) news.html (b) Visit the site (c) href (d) Contact us - 32.True or false: HTML on its own cannot make tables. (a) True (b) False
- 33.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 34.True or false: <ul> is one item of a list. (a) False (b) True
-
35.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> (a) kite.png (b) tiger.jpg (c) map.png (d) A tiger asleep -
36.🔍 Which line is missing its closing tag?
line 1: <em>I love mangoes.</em>
line 2: <i>Cricket is fun.
line 3: <h1>Hello, world!</h1> (a) line 1 (b) line 3 (c) line 2 -
37.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>My pets</p>
<p>Good morning!</p>
<p>My best friend</p> - 38.True or false: <ul> goes in the body. (a) True (b) False
-
39.📋 What number does the browser show next to “Orange”?
<ol start="3">
<li>Mango</li>
<li>Jamun</li>
<li>Orange</li>
<li>Litchi</li>
<li>Papaya</li>
</ol> - 40.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) saves our .html files (d) hosts websites online
Answer key
- </h1>
- <li>
- alt
- <h6>
- bullets
- <head>
- 2
- <ol>
- <!DOCTYPE html>
- 4
- stores a website’s files
- </strong>
- False
- has a closing tag
- on the browser tab
- </h2>
- </small>
- <img>
- in the same tab
- Cricket Club
- 1
- moon.png
- starts a new line
- bullets
- news.html
- 400
- False
- Yes
- A tiger asleep
- has a closing tag
- Contact us
- False
- Yes
- False
- tiger.jpg
- line 2
- 3
- True
- 5
- saves our .html files
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids