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 of these is an empty tag? (a) <h1> (b) <input> (c) <b> (d) <ul>
-
2.📋 What number does the browser show next to “Mango”?
<ol start="2">
<li>Jamun</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Mango</li>
</ol> - 3.🖼️ 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
-
4.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="250"> (a) width (b) An old fort (c) Our school bus (d) bus.jpg - 5.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
6.🔍 One closing tag is missing. Which one?
<h2>Fun facts</h2>
<strong>The red kite
<small>Rain today</small> (a) </h3> (b) </small> (c) </strong> (d) </h2> -
7.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine</p> - 8.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
-
9.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="100"> (a) cake.jpg (b) A red kite (c) map.png (d) kite.png - 10.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 11.🔗 Which attribute holds the address of a link? (a) src (b) href (c) id (d) alt
- 12.💬 How does an HTML comment start? (a) # (b) // (c) /* (d) <!--
- 13.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a closing tag (d) a comment
-
14.📋 What number does the browser show next to “Banana”?
<ol>
<li>Papaya</li>
<li>Mango</li>
<li>Litchi</li>
<li>Banana</li>
</ol> -
15.🔗 Which address opens when you click this link?
<a href="games.html">Art corner</a> (a) Art corner (b) contact.html (c) games.html (d) about.html - 16.Which of these is true of a code editor? (a) colours code to help us (b) sends pages over the net (c) answers page requests (d) hosts websites online
- 17.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 18.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) src (c) height (d) width
- 19.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
- 20.True or false: HTML on its own can pick a random number. (a) False (b) True
-
21.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Birds sing</p> - 22.🏷️ Which is the closing tag for <small>? (a) <small> (b) <small/> (c) <\small> (d) </small>
- 23.🔍 Which is the odd one out? (a) answers page requests (b) stores a website’s files (c) sends pages over the net (d) has an address bar
-
24.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>My pets</p>
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> --> (a) My pets (b) Cricket is fun. (c) Good morning! (d) Hello, world! - 25.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) on the browser tab (d) at the bottom
-
26.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p> (a) I love mangoes. (b) Fun facts (c) Hello, world! (d) Cricket is fun. - 27.True or false: a web server colours code to help us. (a) True (b) False
- 28.Which of these is true of a code editor? (a) opens web pages for us (b) shows line numbers (c) hosts websites online (d) shows pages from the web
-
29.🔗 Which words do you click on?
<a href="art.html">Art corner</a> (a) School news (b) Art corner (c) art.html (d) href - 30.📋 Which list suits a shopping list in any order? (a) <ul> (b) <hr> (c) <br> (d) <ol>
- 31.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
32.🔗 Where does this link open?
<a href="maths.html">Play games</a> (a) in a new tab (b) in the same tab -
33.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Maths fun</a> (a) in the same tab (b) in a new tab -
34.🔗 Where does this link open?
<a href="news.html">About us</a> (a) in a new tab (b) in the same tab - 35.📄 Can HTML on its own count button clicks? (a) Yes (b) No
-
36.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>Rain today</h2>
<p>The red kite</p>
<h2>My best friend</h2>
<p>Fun facts</p> - 37.True or false: <li> is an empty tag. (a) True (b) False
-
38.🔍 Which line is missing its closing tag?
line 1: <h3>Fun facts</h3>
line 2: <u>The red kite
line 3: <p>I love mangoes.</p> (a) line 1 (b) line 3 (c) line 2 -
39.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) dog.jpg (b) Birthday cake (c) moon.png (d) cake.jpg - 40.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) </h1> (c) <h1/> (d) <\h1>
Answer key
- <input>
- 5
- to describe the image
- Our school bus
- has a closing tag
- </strong>
- 2
- a web browser
- kite.png
- an empty tag
- href
- <!--
- an attribute
- 4
- games.html
- colours code to help us
- has a closing tag
- src
- <ul>
- False
- 2
- </small>
- has an address bar
- Hello, world!
- on the browser tab
- Cricket is fun.
- False
- shows line numbers
- Art corner
- <ul>
- Yes
- in the same tab
- in a new tab
- in the same tab
- No
- 3
- False
- line 2
- cake.jpg
- </h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids