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.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) Space Facts (b) Mars is red. (c) index.html (d) Welcome! -
2.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Fun facts</p>
<p>The red kite</p>
<!-- <p>Rain today</p> --> (a) My pets (b) The red kite (c) Fun facts (d) Rain today - 3.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) { (d) [
- 4.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="250"> (a) width (b) An old fort (c) A tiger asleep (d) fort.jpg - 6.True or false: in <img>, height sets how wide it is. (a) True (b) False
- 7.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
- 8.True or false: <title> goes in the head. (a) False (b) True
- 9.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
-
10.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="200"> (a) An old fort (b) fort.jpg (c) width (d) A tiger asleep -
11.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab - 12.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h3> or <h5>? (a) <h3> (b) <h6> (c) <h5> (d) <h2>
- 13.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) turns HTML into a page (d) is where we type code
- 14.Which of these is an empty tag? (a) <p> (b) <ul> (c) <li> (d) <img>
- 15.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
-
16.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Jamun</li>
</ol> (a) bullets (b) numbers - 17.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <li> (c) <ul>
- 18.📄 Can HTML on its own make tables? (a) No (b) Yes
- 19.True or false: in <img>, src sets how tall it is. (a) True (b) False
-
20.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>My best friend</p> -->
<!-- <p>The red kite</p> --> - 21.🔢 In a basic web page file, which comes LAST? (a) </head> (b) </html> (c) <html> (d) <body>
-
22.🔗 Which words do you click on?
<a href="about.html">Maths fun</a> (a) Maths fun (b) Art corner (c) about.html (d) href -
23.🔗 Where does this link open?
<a href="news.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab -
24.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Rain today</h2>
<p>Fun facts</p>
<p>Cricket is fun.</p>
<p>Rain today</p>
<h2>The red kite</h2> - 25.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
- 26.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <ol> (d) <br>
-
27.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine<br>Rivers flow<br>Roses are red</p> - 28.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
-
29.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow<br>Stars shine<br>Kites fly high<br>Roses are red</p> -
30.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Papaya</li>
<li>Grapes</li>
<li>Litchi</li>
</ol> - 31.🔍 Which is the odd one out? (a) opens web pages for us (b) turns HTML into a page (c) shows pages from the web (d) answers page requests
- 32.📄 Can HTML on its own run a game loop? (a) No (b) Yes
- 33.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
-
34.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="100"> -
35.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>Rain today</p>
<p>The red kite</p> (a) The red kite (b) Rain today (c) Fun facts - 36.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 37.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
- 38.True or false: in <img>, src is read by screen readers. (a) False (b) True
-
39.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Fun facts</p>
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p> (a) I love mangoes. (b) Fun facts (c) Cricket is fun. (d) My pets - 40.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h3>? (a) <h3> (b) <h2> (c) <h5> (d) <h1>
Answer key
- Space Facts
- Rain today
- <
- No
- An old fort
- False
- False
- True
- in the body
- An old fort
- in a new tab
- <h2>
- turns HTML into a page
- <img>
- -->
- numbers
- <li>
- Yes
- False
- 1
- </html>
- Maths fun
- in a new tab
- 4
- True
- <ol>
- 4
- Yes
- 5
- 2
- answers page requests
- No
- in the body
- 100
- Fun facts
- has a closing tag
- <a>
- False
- My pets
- <h5>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids