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.🔤 In “HTML”, what does the L stand for? (a) Line (b) Link (c) Language (d) Laptop
-
2.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="350"> (a) The full moon (b) moon.png (c) width (d) Our school bus - 3.Which of these is true of a web browser? (a) shows line numbers (b) saves our .html files (c) opens web pages for us (d) is where we type code
- 4.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) starts a new line (d) makes a list
- 5.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 6.True or false: in <img>, src tells which image to load. (a) True (b) False
- 7.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 10 (d) 3
- 8.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 6 (d) 3
- 9.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h6>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
- 10.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h6> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
- 11.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <\strong> (c) </strong> (d) <strong/>
- 12.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h1>? (a) <h2> (b) <h3> (c) <h5> (d) <h1>
- 13.True or false: <img> goes in the head. (a) True (b) False
- 14.True or false: a web browser shows pages from the web. (a) True (b) False
-
15.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> - 16.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) alt (d) src
-
17.🔗 Where does this link open?
<a href="maths.html">Contact us</a> (a) in a new tab (b) in the same tab - 18.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <table> (c) <style> (d) <title>
- 19.📄 Can HTML on its own make tables? (a) No (b) Yes
-
20.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Good morning!</p>
<p>Rain today</p> (a) My best friend (b) Good morning! (c) Rain today -
21.🔍 One closing tag is missing. Which one?
<h1>Good morning!</h1>
<p>Fun facts</p>
<em>Our school trip (a) </em> (b) </h3> (c) </h1> (d) </p> - 22.True or false: a web server opens web pages for us. (a) True (b) False
- 23.Which of these is a closing tag? (a) <body> (b) <p> (c) <title> (d) </body>
-
24.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) Our school bus (b) fort.jpg (c) bus.jpg (d) tiger.jpg - 25.True or false: a web browser turns HTML into a page. (a) False (b) True
- 26.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h1>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
-
27.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="350"> -
28.🔗 Where does this link open?
<a href="art.html" target="_blank">Maths fun</a> (a) in a new tab (b) in the same tab - 29.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h4> or <h5>? (a) <h4> (b) <h5> (c) <h2> (d) <h6>
- 30.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
- 31.🏷️ Which is the closing tag for <i>? (a) <i> (b) <i/> (c) <\i> (d) </i>
-
32.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h2>Rain today</h2>
<h2>Rain today</h2>
<p>Fun facts</p>
<h2>I love mangoes.</h2> - 33.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) at the bottom (d) on the browser tab
- 34.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
-
35.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="350"> -
36.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="150"> (a) map.png (b) A red kite (c) cake.jpg (d) kite.png - 37.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
- 38.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) <body> (c) </head> (d) <!DOCTYPE html>
- 39.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
- 40.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h6>? (a) <h5> (b) <h6> (c) <h1> (d) <h3>
Answer key
- Language
- The full moon
- opens web pages for us
- starts a new line
- an empty tag
- True
- 6
- 1
- <h1>
- <h6>
- </strong>
- <h1>
- False
- True
- 350
- alt
- in the same tab
- <table>
- Yes
- My best friend
- </em>
- False
- </body>
- bus.jpg
- True
- <h6>
- 350
- in a new tab
- <h6>
- <ul>
- </i>
- 4
- on the browser tab
- in the head
- 350
- kite.png
- to leave notes
- <!DOCTYPE html>
- href
- <h6>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids