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 is the odd one out? (a) shows line numbers (b) colours code to help us (c) has an address bar (d) is where we type code
- 2.Which of these is an opening tag? (a) </h1> (b) </p> (c) <body> (d) </li>
- 3.📝 What does <p> make? (a) a table (b) a paragraph (c) a picture (d) a link
-
4.🔗 Where does this link open?
<a href="quiz.html">Play games</a> (a) in a new tab (b) in the same tab - 5.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) alt (c) width (d) src
-
6.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Orange</li>
<li>Mango</li>
</ol> - 7.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 8.🔗 Which attribute holds the address of a link? (a) href (b) src (c) alt (d) id
-
9.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h3>My pets</h3>
<p>I love mangoes.</p> -
10.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Sky is blue<br>Kites fly high<br>Birds sing</p> -
11.📋 What number does the browser show next to “Mango”?
<ol>
<li>Guava</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Mango</li>
<li>Banana</li>
<li>Litchi</li>
</ol> -
12.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>I love mangoes.</p>
<h2>Our school trip</h2>
<p>Our school trip</p>
<h2>Rain today</h2>
<h2>Fun facts</h2> - 13.🔢 In a basic web page file, which comes LAST? (a) <html> (b) </body> (c) <!DOCTYPE html> (d) </html>
- 14.True or false: <li> goes inside ul or ol. (a) True (b) False
- 15.True or false: <input> is an empty tag. (a) False (b) True
- 16.📝 What does <hr> draw? (a) a link (b) a picture (c) a table (d) a line across the page
- 17.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
-
18.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets - 19.True or false: in <img>, alt sets how tall it is. (a) False (b) True
- 20.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
21.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="100"> - 22.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 23.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
-
24.🔗 Where does this link open?
<a href="art.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab - 25.📄 Which part holds everything you see on the page? (a) the body (b) the title (c) the head (d) the doctype
- 26.Which of these is an opening tag? (a) <b> (b) </title> (c) </b> (d) </p>
- 27.📄 Can HTML on its own make tables? (a) No (b) Yes
- 28.Which of these is an empty tag? (a) <h1> (b) <p> (c) <img> (d) <li>
- 29.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
-
30.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>My pets</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Rain today</p> --> - 31.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
-
32.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h3>My best friend</h3>
<h4>Rain today</h4>
<h4>Hello, world!</h4>
<h3>I love mangoes.</h3> -
33.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="50"> - 34.Which of these is true of a web server? (a) is where we type code (b) stores a website’s files (c) has an address bar (d) shows pages from the web
- 35.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
- 36.Which of these goes in the head? (a) <h1> (b) <style> (c) <p> (d) <img>
-
37.🔗 Where does this link open?
<a href="games.html">Take the quiz</a> (a) in the same tab (b) in a new tab - 38.📄 Can HTML on its own run a game loop? (a) Yes (b) No
-
39.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Orange</li>
<li>Papaya</li>
</ol> - 40.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <\h1> (c) <h1/> (d) <h1>
Answer key
- has an address bar
- <body>
- a paragraph
- in the same tab
- width
- 3
- has a closing tag
- href
- 2
- 4
- 4
- 3
- </html>
- True
- True
- a line across the page
- <a href="about.html">
- bullets
- False
- an opening tag
- 100
- an empty tag
- on the browser tab
- in a new tab
- the body
- <b>
- Yes
- <img>
- in the head
- 1
- in the body
- 5
- 50
- stores a website’s files
- a slash /
- <style>
- in the same tab
- No
- 3
- </h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids