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 address opens when you click this link?
<a href="contact.html">About us</a> (a) maths.html (b) About us (c) contact.html (d) https://example.com -
2.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>My pets</p>
<h2>Fun facts</h2> -
3.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>The red kite</p> -->
<!-- <p>My pets</p> --> - 4.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
- 5.True or false: <li> is one item of a list. (a) True (b) False
- 6.True or false: <ul> lists things in any order. (a) True (b) False
- 7.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <p> (d) <ul>
- 8.True or false: <br> is an empty tag. (a) True (b) False
-
9.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Mango</li>
<li>Litchi</li>
<li>Grapes</li>
</ol> - 10.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 11.Which of these is an opening tag? (a) </body> (b) </b> (c) </h1> (d) <body>
-
12.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue<br>Rivers flow<br>Stars shine<br>Roses are red</p> - 13.📄 Where does the text of <title> appear? (a) at the bottom (b) on the browser tab (c) in a big heading (d) nowhere
- 14.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
-
15.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="250"> - 16.True or false: in <img>, src sets how tall it is. (a) False (b) True
- 17.True or false: a web server sends pages over the net. (a) True (b) False
- 18.🏷️ HTML marks up text using ___. (a) tags (b) wires (c) keys (d) pixels
-
19.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Birds sing</p> - 20.True or false: <h1> goes in the body. (a) True (b) False
- 21.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
- 22.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 23.🔍 Which is the odd one out? (a) is where we type code (b) saves our .html files (c) shows line numbers (d) shows pages from the web
-
24.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="200"> (a) Birthday cake (b) map.png (c) width (d) Map of India - 25.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h6> (d) <h2>
- 26.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
- 27.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
28.🔗 Which words do you click on?
<a href="games.html">Play games</a> (a) Play games (b) games.html (c) href (d) About us -
29.🔗 Where does this link open?
<a href="games.html">About us</a> (a) in a new tab (b) in the same tab -
30.📋 What number does the browser show next to “Jamun”?
<ol start="4">
<li>Litchi</li>
<li>Jamun</li>
<li>Papaya</li>
</ol> -
31.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Papaya</li>
</ul> - 32.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
-
33.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Match report</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Match report (b) We won by 5 runs. (c) index.html (d) My Hobbies - 34.🖼️ 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
-
35.📋 What number does the browser show next to “Banana”?
<ol start="7">
<li>Mango</li>
<li>Banana</li>
<li>Papaya</li>
<li>Orange</li>
<li>Grapes</li>
<li>Guava</li>
</ol> -
36.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="50"> - 37.🔢 In a basic web page file, which comes first: “</head>” or “<head>”? (a) <head> (b) </head>
-
38.🔍 One closing tag is missing. Which one?
<h2>Good morning!
<h1>The red kite</h1>
<b>My pets</b> (a) </b> (b) </h1> (c) </h2> (d) </strong> - 39.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h2> or <h5>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
- 40.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
Answer key
- contact.html
- 2
- 1
- opens it in a new tab
- True
- True
- <li>
- True
- 2
- has a closing tag
- <body>
- 5
- on the browser tab
- <a>
- 250
- False
- True
- tags
- 2
- True
- <ul>
- has a closing tag
- shows pages from the web
- Map of India
- <h6>
- False
- No
- Play games
- in the same tab
- 5
- 2
- <img>
- My Hobbies
- to describe the image
- 8
- 50
- <head>
- </h2>
- <h6>
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids