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 this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets -
2.🔗 Which words do you click on?
<a href="quiz.html">Visit the site</a> (a) Visit the site (b) href (c) quiz.html (d) Maths fun - 3.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
-
4.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Jamun</li>
</ul> - 5.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
-
6.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="350"> (a) An old fort (b) bus.jpg (c) Our school bus (d) width - 7.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
- 8.🔗 What does HyperText mean? (a) text in colour (b) text with links (c) secret text (d) very big text
-
9.🔍 Which line is missing its closing tag?
line 1: <h1>Hello, world!
line 2: <strong>Cricket is fun.</strong>
line 3: <small>My best friend</small> (a) line 3 (b) line 1 (c) line 2 -
10.🔗 Where does this link open?
<a href="maths.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab - 11.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
-
12.🔗 Which address opens when you click this link?
<a href="games.html">Contact us</a> (a) about.html (b) Contact us (c) contact.html (d) games.html - 13.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
- 14.True or false: HTML on its own cannot make headings. (a) False (b) True
-
15.🔍 One closing tag is missing. Which one?
<h3>Fun facts</h3>
<h1>I love mangoes.</h1>
<p>Hello, world! (a) </h3> (b) </i> (c) </h1> (d) </p> -
16.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) index.html (b) Welcome! (c) I like to read. (d) Space Facts -
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="300"> (a) moon.png (b) width (c) The full moon (d) Our school bus -
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) The full moon (b) width (c) A happy dog (d) dog.jpg - 19.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
- 20.True or false: a web browser has an address bar. (a) False (b) True
-
21.📋 What number does the browser show next to “Banana”?
<ol>
<li>Mango</li>
<li>Banana</li>
<li>Litchi</li>
<li>Orange</li>
<li>Guava</li>
</ol> - 22.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
23.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>My pets</p>
<p>Hello, world!</p> - 24.🖼️ Which attribute of <img> describes the picture? (a) alt (b) height (c) width (d) src
-
25.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>I love mangoes.</p>
<p>Our school trip</p> (a) Our school trip (b) My best friend (c) I love mangoes. - 26.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 27.True or false: <ul> is an empty tag. (a) False (b) True
-
28.📋 What number does the browser show next to “Jamun”?
<ol start="7">
<li>Litchi</li>
<li>Jamun</li>
<li>Grapes</li>
</ol> - 29.True or false: HTML on its own can run a game loop. (a) True (b) False
- 30.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
31.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> - 32.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h2> or <h4>? (a) <h2> (b) <h3> (c) <h4> (d) <h5>
-
33.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="50"> (a) cake.jpg (b) Map of India (c) map.png (d) dog.jpg - 34.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 35.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>
-
36.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow<br>Roses are red<br>Birds sing<br>Kites fly high</p> -
37.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) About us (b) contact.html (c) href (d) Play games - 38.Which of these is a closing tag? (a) </b> (b) <h1> (c) <b> (d) <p>
- 39.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
40.🔍 One closing tag is missing. Which one?
<strong>Rain today
<u>Hello, world!</u>
<h2>Our school trip</h2> (a) </u> (b) </h2> (c) </small> (d) </strong>
Answer key
- bullets
- Visit the site
- <ol>
- 2
- on the browser tab
- Our school bus
- False
- text with links
- line 1
- in a new tab
- to leave notes
- games.html
- a web browser
- False
- </p>
- Space Facts
- The full moon
- A happy dog
- Yes
- True
- 2
- has a closing tag
- 2
- alt
- My best friend
- has a closing tag
- False
- 8
- False
- a closing tag
- 100
- <h5>
- map.png
- in the head
- <h6>
- 5
- Play games
- </b>
- an opening tag
- </strong>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids