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 list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
- 2.🔍 Which is the odd one out? (a) shows pages from the web (b) turns HTML into a page (c) stores a website’s files (d) has an address bar
-
3.🔗 Which words do you click on?
<a href="maths.html">Take the quiz</a> (a) maths.html (b) Take the quiz (c) href (d) Play games - 4.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
-
5.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Grapes</li>
<li>Papaya</li>
</ul> (a) numbers (b) bullets - 6.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
- 7.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
8.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<!-- <p>The red kite</p> --> (a) I love mangoes. (b) Cricket is fun. (c) The red kite (d) Hello, world! -
9.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>The red kite</p>
<p>My pets</p>
<!-- <p>Fun facts</p> --> (a) The red kite (b) My pets (c) Fun facts (d) I love mangoes. - 10.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h2> (d) <h4>
-
11.🔗 Where does this link open?
<a href="contact.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 12.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
-
13.📋 What number does the browser show next to “Guava”?
<ol start="8">
<li>Litchi</li>
<li>Mango</li>
<li>Papaya</li>
<li>Guava</li>
<li>Jamun</li>
</ol> - 14.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
- 15.True or false: a code editor opens web pages for us. (a) True (b) False
-
16.🔗 Where does this link open?
<a href="art.html">Art corner</a> (a) in the same tab (b) in a new tab -
17.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="250"> - 18.🌍 Which program shows a web page to us? (a) a music player (b) a web browser (c) a calculator (d) a paint program
-
19.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing<br>Kites fly high</p> - 20.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
-
21.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Hello, world!</p>
<!-- <p>Fun facts</p> -->
<p>My pets</p> (a) My pets (b) Hello, world! (c) The red kite (d) Fun facts -
22.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>My best friend</p> -->
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p> - 23.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
-
24.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h3>Hello, world!</h3>
<h2>My best friend</h2>
<h2>The red kite</h2>
<h3>The red kite</h3> - 25.True or false: <li> shows 1, 2, 3 numbers. (a) True (b) False
- 26.Which of these goes in the head? (a) <h1> (b) <table> (c) <p> (d) <title>
- 27.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 28.Which of these is true of a code editor? (a) turns HTML into a page (b) opens web pages for us (c) has an address bar (d) shows line numbers
- 29.🔤 In “HTML”, what does the L stand for? (a) Language (b) Laptop (c) Link (d) Line
-
30.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>Cricket is fun.</h2>
<h2>Good morning!</h2> - 31.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) height (d) width
- 32.🖼️ 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
- 33.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) <\h1> (c) </h1> (d) <h1>
- 34.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <a> (d) <pic>
- 35.📝 What do we need to write HTML? (a) a printer (b) a plain text editor (c) a microphone (d) a paintbrush
-
36.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Litchi</li>
<li>Guava</li>
</ul> (a) numbers (b) bullets -
37.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="150"> (a) cake.jpg (b) dog.jpg (c) map.png (d) Map of India -
38.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Mango</li>
</ol> -
39.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) All about me (c) index.html (d) Space Facts -
40.🔍 One closing tag is missing. Which one?
<h1>My pets</h1>
<em>Our school trip</em>
<p>My best friend (a) </u> (b) </em> (c) </h1> (d) </p>
Answer key
- <ul>
- stores a website’s files
- Take the quiz
- in the body
- bullets
- -->
- an opening tag
- The red kite
- Fun facts
- <h2>
- in a new tab
- in the head
- 11
- opens it in a new tab
- False
- in the same tab
- 250
- a web browser
- 3
- on the browser tab
- Fun facts
- 2
- <ul>
- 5
- False
- <title>
- Yes
- shows line numbers
- Language
- 1
- alt
- to describe the image
- </h1>
- <img>
- a plain text editor
- bullets
- map.png
- 2
- Space Facts
- </p>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids