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: HTML on its own can make a form. (a) True (b) False
- 2.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 3.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
-
4.🔍 One closing tag is missing. Which one?
<em>Good morning!</em>
<h2>Rain today</h2>
<h3>Fun facts (a) </em> (b) </b> (c) </h2> (d) </h3> - 5.Which of these is true of a web browser? (a) shows line numbers (b) is where we type code (c) shows pages from the web (d) hosts websites online
- 6.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) </h3> (c) <h3/> (d) <\h3>
- 7.Which of these is an empty tag? (a) <ul> (b) <title> (c) <hr> (d) <li>
- 8.True or false: <ul> is an empty tag. (a) False (b) True
-
9.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="200"> - 10.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h4> or <h1>? (a) <h5> (b) <h2> (c) <h1> (d) <h4>
- 11.True or false: HTML on its own cannot make a form. (a) True (b) False
- 12.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
- 13.🔢 In a basic web page file, which comes first: “</body>” or “</head>”? (a) </body> (b) </head>
-
14.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Mango</li>
<li>Orange</li>
</ul> (a) numbers (b) bullets - 15.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
-
16.🔗 Which address opens when you click this link?
<a href="https://example.com">Maths fun</a> (a) https://example.com (b) maths.html (c) art.html (d) Maths fun - 17.True or false: <ol> is an ordered list. (a) False (b) True
-
18.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>The red kite</p> -->
<p>Rain today</p>
<!-- <p>Our school trip</p> --> - 19.💬 How does an HTML comment end? (a) // (b) --> (c) */ (d) >>
-
20.🔍 One closing tag is missing. Which one?
<i>Fun facts
<u>Cricket is fun.</u>
<small>The red kite</small> (a) </i> (b) </u> (c) </small> (d) </h1> - 21.Which of these goes in the head? (a) <img> (b) <style> (c) <p> (d) <a>
-
22.🔗 Where does this link open?
<a href="news.html">School news</a> (a) in a new tab (b) in the same tab -
23.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h3>Rain today</h3>
<p>Cricket is fun.</p>
<p>My pets</p> -
24.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>Mars is red.</p>
</body>
</html> (a) Class 7 Blog (b) index.html (c) Mars is red. (d) My drawings - 25.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dot . (c) a dollar $ (d) a hash #
- 26.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
-
27.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Hello, world!</p>
<p>Cricket is fun.</p>
<p>I love mangoes.</p> - 28.Which of these is true of a code editor? (a) stores a website’s files (b) has an address bar (c) colours code to help us (d) opens web pages for us
- 29.🔍 Which is the odd one out? (a) shows pages from the web (b) has an address bar (c) turns HTML into a page (d) is where we type code
-
30.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="400"> (a) map.png (b) cake.jpg (c) A red kite (d) kite.png -
31.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Fun facts</p>
<!-- <p>Hello, world!</p> -->
<p>Rain today</p> (a) Hello, world! (b) Cricket is fun. (c) Rain today (d) Fun facts - 32.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Language (c) Link (d) Line
-
33.🔗 Which words do you click on?
<a href="games.html">Visit the site</a> (a) games.html (b) Maths fun (c) href (d) Visit the site - 34.Which of these is true of a web server? (a) has an address bar (b) colours code to help us (c) shows line numbers (d) stores a website’s files
- 35.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
- 36.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
-
37.🔗 Which address opens when you click this link?
<a href="maths.html">Take the quiz</a> (a) news.html (b) Take the quiz (c) art.html (d) maths.html -
38.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="350"> (a) width (b) Map of India (c) map.png (d) Birthday cake - 39.True or false: in <img>, height is read by screen readers. (a) True (b) False
- 40.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
Answer key
- True
- Yes
- starts a new line
- </h3>
- shows pages from the web
- </h3>
- <hr>
- False
- 200
- <h5>
- False
- <li>
- </head>
- bullets
- to leave notes
- https://example.com
- True
- 1
- -->
- </i>
- <style>
- in the same tab
- 2
- Class 7 Blog
- a slash /
- <h1>
- 1
- colours code to help us
- is where we type code
- kite.png
- Hello, world!
- Language
- Visit the site
- stores a website’s files
- <ul>
- <!DOCTYPE html>
- maths.html
- Map of India
- False
- in the head
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids