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 number does the browser show next to “Guava”?
<ol>
<li>Papaya</li>
<li>Mango</li>
<li>Banana</li>
<li>Guava</li>
</ol> -
2.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Orange</li>
</ul> (a) bullets (b) numbers -
3.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Banana</li>
</ul> (a) bullets (b) numbers - 4.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h6> (d) <h1>
-
5.🔗 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 -
6.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>My best friend</p>
<p>My best friend</p>
<h3>Fun facts</h3> -
7.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Papaya</li>
<li>Banana</li>
</ol> - 8.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) width (c) src (d) height
- 9.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to describe the image (d) to load it faster
-
10.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="400"> (a) fort.jpg (b) An old fort (c) A tiger asleep (d) width - 11.True or false: <ol> is an ordered list. (a) True (b) False
- 12.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h4> or <h1>? (a) <h2> (b) <h4> (c) <h1> (d) <h3>
-
13.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Papaya</li>
<li>Orange</li>
<li>Guava</li>
<li>Litchi</li>
<li>Jamun</li>
</ol> - 14.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) <h2/> (d) </h2>
- 15.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
- 16.True or false: in <img>, width names the picture file. (a) True (b) False
-
17.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Planets</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Art Gallery (b) Planets (c) body (d) Thanks for visiting. -
18.🔗 Which words do you click on?
<a href="maths.html">Take the quiz</a> (a) Take the quiz (b) maths.html (c) href (d) Play games -
19.🔗 Which words do you click on?
<a href="quiz.html">Maths fun</a> (a) quiz.html (b) Maths fun (c) href (d) Art corner - 20.True or false: <style> goes in the body. (a) True (b) False
-
21.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red<br>Rivers flow<br>Stars shine<br>Sky is blue</p> - 22.True or false: in <img>, width sets how wide it is. (a) True (b) False
- 23.True or false: <ul> is an unordered list. (a) True (b) False
- 24.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
-
25.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h3>Hello, world!</h3>
<h2>Good morning!</h2>
<p>Hello, world!</p> -
26.🔗 Which words do you click on?
<a href="games.html">Art corner</a> (a) Art corner (b) School news (c) href (d) games.html - 27.True or false: <ol> is an unordered list. (a) False (b) True
- 28.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 29.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
- 30.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
- 31.🔗 Which attribute holds the address of a link? (a) href (b) src (c) alt (d) id
- 32.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
- 33.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
-
34.🔗 Where does this link open?
<a href="https://example.com">About us</a> (a) in the same tab (b) in a new tab - 35.True or false: a web browser colours code to help us. (a) False (b) True
- 36.💬 Does the browser show comments on the page? (a) Yes (b) No
- 37.Which of these is a closing tag? (a) <p> (b) <body> (c) <li> (d) </h1>
- 38.🔍 Which is the odd one out? (a) saves our .html files (b) opens web pages for us (c) colours code to help us (d) shows line numbers
- 39.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 40.True or false: <li> is one item of a list. (a) False (b) True
Answer key
- 4
- bullets
- bullets
- <h1>
- contact.html
- 2
- 3
- width
- to describe the image
- An old fort
- True
- <h1>
- 6
- </h2>
- Yes
- False
- Planets
- Take the quiz
- Maths fun
- False
- 5
- True
- True
- False
- 3
- Art corner
- False
- No
- to leave notes
- 6
- href
- <a>
- <a href="about.html">
- in the same tab
- False
- No
- </h1>
- opens web pages for us
- Yes
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids