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.📄 Can HTML on its own count button clicks? (a) No (b) Yes
-
2.🔗 Where does this link open?
<a href="quiz.html">Play games</a> (a) in the same tab (b) in a new tab -
3.🔍 One closing tag is missing. Which one?
<em>Good morning!
<h2>My pets</h2>
<h1>Hello, world!</h1> (a) </h2> (b) </small> (c) </em> (d) </h1> - 4.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h3>? (a) <h2> (b) <h5> (c) <h4> (d) <h3>
-
5.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>The red kite</p>
<p>Cricket is fun.</p>
<p>Good morning!</p> (a) Hello, world! (b) Good morning! (c) Cricket is fun. (d) The red kite - 6.True or false: <img> goes in the body. (a) False (b) True
- 7.True or false: <title> has a closing tag. (a) True (b) False
-
8.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="250"> (a) kite.png (b) A red kite (c) Map of India (d) width - 9.📝 What does <br> do? (a) makes a list (b) makes text bold (c) starts a new line (d) adds a picture
- 10.True or false: <table> goes in the body. (a) True (b) False
- 11.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to show pictures (d) to add colour
- 12.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
- 13.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
-
14.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Hello, world!</p>
<p>Our school trip</p>
<h3>Good morning!</h3>
<h2>Good morning!</h2> -
15.🔍 One closing tag is missing. Which one?
<p>My best friend
<small>Cricket is fun.</small>
<em>My pets</em> (a) </p> (b) </u> (c) </em> (d) </small> - 16.Which of these has a closing tag? (a) <hr> (b) <img> (c) <input> (d) <h1>
- 17.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 3 (d) 4
- 18.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
19.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine<br>Kites fly high<br>Birds sing<br>Sky is blue</p> -
20.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="150"> (a) dog.jpg (b) Map of India (c) map.png (d) cake.jpg -
21.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>I love mangoes.</p>
<p>Our school trip</p>
<!-- <p>Cricket is fun.</p> --> (a) I love mangoes. (b) Cricket is fun. (c) Our school trip (d) My pets -
22.🔗 Which words do you click on?
<a href="news.html">Take the quiz</a> (a) news.html (b) Take the quiz (c) Play games (d) href - 23.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <ol> (d) <br>
-
24.🔗 Where does this link open?
<a href="games.html" target="_blank">Maths fun</a> (a) in a new tab (b) in the same tab - 25.Which of these goes in the body? (a) <h1> (b) <title> (c) <style> (d) <link rel="stylesheet">
- 26.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em/> (c) </em> (d) <em>
- 27.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
-
28.📋 What number does the browser show next to “Papaya”?
<ol start="9">
<li>Grapes</li>
<li>Papaya</li>
<li>Banana</li>
<li>Mango</li>
<li>Orange</li>
</ol> -
29.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h4>My pets</h4>
<h2>Cricket is fun.</h2>
<h4>I love mangoes.</h4> - 30.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h1> or <h3>? (a) <h1> (b) <h2> (c) <h4> (d) <h3>
- 31.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <h2/> (c) </h2> (d) <\h2>
- 32.Which of these is an empty tag? (a) <input> (b) <p> (c) <h1> (d) <b>
- 33.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 34.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
-
35.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Orange</li>
</ul> - 36.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <head> (c) </head> (d) </html>
-
37.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> (a) tiger.jpg (b) A tiger asleep (c) map.png (d) kite.png -
38.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="200"> (a) width (b) Our school bus (c) An old fort (d) bus.jpg - 39.Which of these is a closing tag? (a) <h1> (b) </li> (c) <p> (d) <body>
- 40.🔍 Which is the odd one out? (a) shows line numbers (b) has an address bar (c) opens web pages for us (d) turns HTML into a page
Answer key
- No
- in the same tab
- </em>
- <h2>
- Hello, world!
- True
- True
- A red kite
- starts a new line
- True
- to leave notes
- <img>
- <a href="about.html">
- 3
- </p>
- <h1>
- 6
- No
- 5
- map.png
- Cricket is fun.
- Take the quiz
- <ul>
- in a new tab
- <h1>
- </em>
- <h5>
- 10
- 4
- <h4>
- </h2>
- <input>
- Yes
- <li>
- 2
- </html>
- tiger.jpg
- Our school bus
- </li>
- shows line numbers
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids