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.📝 What does <br> do? (a) makes a list (b) starts a new line (c) makes text bold (d) adds a picture
-
2.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="100"> -
3.🔗 Which words do you click on?
<a href="games.html">Visit the site</a> (a) Visit the site (b) games.html (c) href (d) Maths fun - 4.Which of these goes in the body? (a) <title> (b) <style> (c) <a> (d) <meta charset="utf-8">
- 5.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
-
6.🔍 One closing tag is missing. Which one?
<h1>My pets
<em>The red kite</em>
<h2>Hello, world!</h2> (a) </h2> (b) </u> (c) </em> (d) </h1> - 7.📝 What does <p> make? (a) a link (b) a table (c) a picture (d) a paragraph
-
8.🔗 Which address opens when you click this link?
<a href="games.html">Visit the site</a> (a) contact.html (b) about.html (c) Visit the site (d) games.html -
9.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) tiger.jpg (b) width (c) A red kite (d) A tiger asleep -
10.📋 What number does the browser show next to “Orange”?
<ol start="5">
<li>Guava</li>
<li>Orange</li>
<li>Banana</li>
</ol> - 11.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 12.True or false: in <img>, height is read by screen readers. (a) False (b) True
-
13.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h4>Cricket is fun.</h4>
<h4>Cricket is fun.</h4>
<p>Rain today</p> -
14.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine</p> - 15.🌐 Which one shows line numbers? (a) a web server (b) a code editor (c) a web browser
- 16.True or false: <p> is an empty tag. (a) True (b) False
-
17.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Grapes</li>
</ul> (a) bullets (b) numbers - 18.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <p> (d) <h6>
- 19.Which of these goes in the head? (a) <ul> (b) <a> (c) <link rel="stylesheet"> (d) <h1>
-
20.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>My pets</h4>
<h4>I love mangoes.</h4> -
21.🔗 Which address opens when you click this link?
<a href="quiz.html">Maths fun</a> (a) games.html (b) about.html (c) quiz.html (d) Maths fun -
22.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Jamun</li>
<li>Guava</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Banana</li>
</ul> - 23.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
-
24.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p> (a) I love mangoes. (b) Our school trip (c) Fun facts - 25.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
-
26.🔍 Which line is missing its closing tag?
line 1: <small>Hello, world!
line 2: <h1>I love mangoes.</h1>
line 3: <em>Cricket is fun.</em> (a) line 2 (b) line 1 (c) line 3 - 27.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
28.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<!-- <p>My best friend</p> -->
<p>My pets</p>
<p>The red kite</p> -
29.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>I love mangoes.</p>
<p>Fun facts</p>
<h2>I love mangoes.</h2>
<p>Cricket is fun.</p>
<p>Our school trip</p> -
30.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Jamun</li>
<li>Guava</li>
</ol> (a) numbers (b) bullets -
31.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p>
<p>My pets</p>
<p>Rain today</p> (a) My best friend (b) Rain today (c) Cricket is fun. (d) My pets -
32.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) Planets (c) body (d) Art Gallery - 33.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) alt (c) width (d) height
- 34.True or false: in <img>, width tells which image to load. (a) True (b) False
- 35.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 36.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
- 37.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
- 38.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
- 39.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to load it faster (d) to colour it
- 40.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
Answer key
- starts a new line
- 100
- Visit the site
- <a>
- True
- </h1>
- a paragraph
- games.html
- A tiger asleep
- 6
- an opening tag
- False
- 3
- 2
- a code editor
- False
- bullets
- <h6>
- <link rel="stylesheet">
- 3
- quiz.html
- 6
- in the body
- Our school trip
- <ol>
- line 1
- an opening tag
- 2
- 5
- numbers
- Cricket is fun.
- Planets
- alt
- False
- a closing tag
- <ol>
- <ol>
- <img>
- to describe the image
- <
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids