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.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
2.🔗 Where does this link open?
<a href="quiz.html">About us</a> (a) in a new tab (b) in the same tab - 3.Which of these is a closing tag? (a) <li> (b) <h1> (c) </p> (d) <p>
- 4.True or false: <img> goes in the body. (a) True (b) False
-
5.🔗 Which words do you click on?
<a href="quiz.html">Play games</a> (a) quiz.html (b) About us (c) Play games (d) href - 6.🔍 Which is the odd one out? (a) saves our .html files (b) shows line numbers (c) colours code to help us (d) stores a website’s files
- 7.📄 Can HTML on its own make links to pages? (a) Yes (b) No
-
8.🔗 Which words do you click on?
<a href="quiz.html">School news</a> (a) quiz.html (b) Take the quiz (c) href (d) School news -
9.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Birds sing<br>Roses are red<br>Stars shine<br>Kites fly high</p> - 10.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) a comment (d) an attribute
- 11.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
-
12.🔗 Where does this link open?
<a href="news.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab -
13.🔍 One closing tag is missing. Which one?
<b>I love mangoes.</b>
<h2>My pets</h2>
<h3>Our school trip (a) </h3> (b) </b> (c) </h2> (d) </em> - 14.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h5> or <h3>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
-
15.🔗 Where does this link open?
<a href="games.html" target="_blank">About us</a> (a) in a new tab (b) in the same tab - 16.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
- 17.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
-
18.🔗 Which words do you click on?
<a href="maths.html">Maths fun</a> (a) Art corner (b) href (c) Maths fun (d) maths.html -
19.📋 What number does the browser show next to “Papaya”?
<ol start="5">
<li>Mango</li>
<li>Orange</li>
<li>Litchi</li>
<li>Papaya</li>
<li>Grapes</li>
</ol> - 20.🔍 Which is the odd one out? (a) has an address bar (b) colours code to help us (c) turns HTML into a page (d) opens web pages for us
- 21.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h4>? (a) <h3> (b) <h5> (c) <h4> (d) <h1>
-
22.💬 How many paragraphs show on the page?
<p>The red kite</p>
<p>I love mangoes.</p>
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p>
<p>My best friend</p> - 23.True or false: in <img>, height sets how tall it is. (a) False (b) True
-
24.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>Rain today</h2>
<p>My pets</p>
<p>The red kite</p> - 25.True or false: a code editor shows pages from the web. (a) True (b) False
-
26.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="50"> (a) kite.png (b) A red kite (c) map.png (d) cake.jpg - 27.True or false: <h1> is an empty tag. (a) True (b) False
- 28.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h1> or <h2>? (a) <h2> (b) <h3> (c) <h5> (d) <h1>
- 29.🔢 In a basic web page file, which comes first: “<head>” or “<!DOCTYPE html>”? (a) <head> (b) <!DOCTYPE html>
- 30.📄 Can HTML on its own count button clicks? (a) No (b) Yes
-
31.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Rivers flow<br>Sky is blue<br>Roses are red</p> -
32.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Litchi</li>
<li>Orange</li>
</ol> (a) bullets (b) numbers - 33.True or false: HTML on its own cannot keep a high score. (a) True (b) False
- 34.🏷️ Which is the closing tag for <u>? (a) <u> (b) <\u> (c) </u> (d) <u/>
- 35.📋 Which list tag is one item of a list? (a) <ol> (b) <ul> (c) <li>
-
36.🔗 Which words do you click on?
<a href="maths.html">About us</a> (a) About us (b) href (c) Contact us (d) maths.html - 37.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to load it faster (d) to colour it
- 38.True or false: HTML on its own can pick a random number. (a) False (b) True
-
39.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Papaya</li>
<li>Guava</li>
</ul> - 40.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <img> (d) <style>
Answer key
- No
- in the same tab
- </p>
- True
- Play games
- stores a website’s files
- Yes
- School news
- 5
- an attribute
- False
- in a new tab
- </h3>
- <h5>
- in a new tab
- on the browser tab
- in the body
- Maths fun
- 8
- colours code to help us
- <h1>
- 4
- True
- 2
- False
- kite.png
- False
- <h1>
- <!DOCTYPE html>
- No
- 4
- numbers
- True
- </u>
- <li>
- About us
- to describe the image
- False
- 3
- <img>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids