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) is where we type code (b) shows line numbers (c) colours code to help us (d) has an address bar
- 2.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 3.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) </h3> (c) <h3> (d) <\h3>
- 4.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
- 5.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) Hot Tags (c) HyperText (d) High Tech
- 6.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
-
7.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="50"> (a) An old fort (b) fort.jpg (c) A tiger asleep (d) width -
8.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Sky is blue</p> - 9.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to load it faster (d) to describe the image
- 10.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <body> (b) <!DOCTYPE html>
- 11.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h6> (d) <h1>
-
12.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Banana</li>
<li>Guava</li>
</ul> (a) numbers (b) bullets -
13.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) kite.png (b) A tiger asleep (c) tiger.jpg (d) map.png - 14.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
-
15.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Fun facts</p>
<p>I love mangoes.</p> -
16.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Guava</li>
<li>Orange</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Mango</li>
</ol> -
17.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="150"> (a) cake.jpg (b) Birthday cake (c) dog.jpg (d) moon.png -
18.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Art corner</a> (a) in a new tab (b) in the same tab -
19.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p>
<p>The red kite</p>
<p>Good morning!</p> (a) Cricket is fun. (b) The red kite (c) Rain today (d) Good morning! -
20.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p>
<p>Cricket is fun.</p> (a) Good morning! (b) I love mangoes. (c) Cricket is fun. - 21.📝 What does <br> do? (a) makes text bold (b) makes a list (c) adds a picture (d) starts a new line
-
22.🔍 One closing tag is missing. Which one?
<h1>Our school trip</h1>
<em>Good morning!
<p>The red kite</p> (a) </em> (b) </p> (c) </b> (d) </h1> -
23.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p> -
24.🔍 One closing tag is missing. Which one?
<h1>Cricket is fun.</h1>
<em>Rain today</em>
<strong>My pets (a) </em> (b) </h1> (c) </i> (d) </strong> -
25.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>The red kite</h2>
<h2>Rain today</h2> - 26.🔢 In a basic web page file, which comes LAST? (a) </body> (b) </html> (c) <head> (d) <html>
- 27.Which of these has a closing tag? (a) <meta> (b) <p> (c) <input> (d) <br>
- 28.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h3> or <h2>? (a) <h2> (b) <h3> (c) <h1> (d) <h4>
- 29.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
- 30.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
31.📋 What number does the browser show next to “Orange”?
<ol>
<li>Litchi</li>
<li>Orange</li>
<li>Mango</li>
</ol> - 32.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h4> or <h2>? (a) <h2> (b) <h4> (c) <h6> (d) <h5>
-
33.🔗 Which address opens when you click this link?
<a href="contact.html">Art corner</a> (a) contact.html (b) Art corner (c) maths.html (d) https://example.com -
34.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Hello, world!</p>
<h3>Fun facts</h3> -
35.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="100"> (a) map.png (b) Map of India (c) width (d) Birthday cake - 36.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) </strong> (c) <\strong> (d) <strong/>
-
37.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>My pets</p>
<p>Fun facts</p>
<h3>I love mangoes.</h3> - 38.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em/> (c) <em> (d) </em>
-
39.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>Our school trip</p>
<!-- <p>Cricket is fun.</p> -->
<p>Good morning!</p>
<!-- <p>Hello, world!</p> --> -
40.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Sky is blue<br>Stars shine</p>
Answer key
- has an address bar
- Yes
- </h3>
- <
- HyperText
- a slash /
- An old fort
- 2
- to describe the image
- <!DOCTYPE html>
- <h1>
- bullets
- tiger.jpg
- <a>
- 2
- 5
- cake.jpg
- in a new tab
- Rain today
- I love mangoes.
- starts a new line
- </em>
- 2
- </strong>
- 1
- </html>
- <p>
- <h1>
- <!DOCTYPE html>
- a closing tag
- 2
- <h6>
- contact.html
- 2
- Map of India
- </strong>
- 2
- </em>
- 3
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids