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.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="400"> (a) Birthday cake (b) Map of India (c) width (d) map.png - 2.🔍 Which is the odd one out? (a) shows line numbers (b) opens web pages for us (c) colours code to help us (d) saves our .html files
- 3.Which of these goes in the body? (a) <ul> (b) <title> (c) <meta charset="utf-8"> (d) <style>
- 4.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h4>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
-
5.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Welcome! (b) We won by 5 runs. (c) Space Facts (d) index.html -
6.🔗 Where does this link open?
<a href="art.html">Play games</a> (a) in a new tab (b) in the same tab - 7.Which of these is an opening tag? (a) </h1> (b) </body> (c) <h1> (d) </b>
- 8.True or false: a web browser is where we type code. (a) False (b) True
- 9.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) </head> (b) <!DOCTYPE html>
-
10.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>I love mangoes.</h2>
<p>Good morning!</p>
<h4>Cricket is fun.</h4> -
11.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) index.html (c) All about me (d) Art Gallery - 12.Which of these goes in the head? (a) <img> (b) <table> (c) <title> (d) <h1>
-
13.🔗 Which words do you click on?
<a href="about.html">Maths fun</a> (a) Art corner (b) about.html (c) Maths fun (d) href -
14.🔗 Which words do you click on?
<a href="news.html">About us</a> (a) Contact us (b) news.html (c) About us (d) href - 15.Which of these is an empty tag? (a) <b> (b) <h1> (c) <br> (d) <p>
- 16.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <ul> (d) <hr>
- 17.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
- 18.📄 Can HTML on its own make a form? (a) No (b) Yes
- 19.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to show pictures (d) to add colour
- 20.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
-
21.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Our school trip</p>
<p>My best friend</p> (a) My pets (b) My best friend (c) Our school trip -
22.🔗 Where does this link open?
<a href="contact.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab -
23.🔍 One closing tag is missing. Which one?
<i>My pets</i>
<b>Good morning!</b>
<h2>My best friend (a) </b> (b) </i> (c) </h1> (d) </h2> -
24.🔗 Which words do you click on?
<a href="maths.html">Art corner</a> (a) Art corner (b) href (c) maths.html (d) School news -
25.🔍 One closing tag is missing. Which one?
<em>My pets
<h2>Fun facts</h2>
<small>Hello, world!</small> (a) </small> (b) </h2> (c) </u> (d) </em> -
26.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>My best friend</p> -->
<p>Hello, world!</p> - 27.🖼️ Which attribute of <img> names the picture file? (a) height (b) width (c) src (d) alt
- 28.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
- 29.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h6>? (a) <h1> (b) <h5> (c) <h4> (d) <h6>
- 30.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h1>? (a) <h3> (b) <h6> (c) <h1> (d) <h2>
- 31.True or false: <a> goes in the head. (a) True (b) False
-
32.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Papaya</li>
</ol> (a) numbers (b) bullets -
33.🔍 Which line is missing its closing tag?
line 1: <b>Fun facts</b>
line 2: <h2>My pets
line 3: <small>The red kite</small> (a) line 3 (b) line 2 (c) line 1 -
34.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) The full moon (b) width (c) A happy dog (d) dog.jpg - 35.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) src (c) alt (d) width
- 36.True or false: a web browser sends pages over the net. (a) False (b) True
- 37.🔢 In a basic web page file, which comes LAST? (a) <html> (b) <body> (c) </body> (d) </html>
- 38.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h2> or <h6>? (a) <h6> (b) <h4> (c) <h2> (d) <h3>
- 39.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 40.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) </body> (c) <!DOCTYPE html> (d) <body>
Answer key
- Map of India
- opens web pages for us
- <ul>
- <h2>
- Space Facts
- in the same tab
- <h1>
- False
- <!DOCTYPE html>
- 3
- Art Gallery
- <title>
- Maths fun
- About us
- <br>
- <ul>
- a line across the page
- Yes
- to leave notes
- a code editor
- My pets
- in a new tab
- </h2>
- Art corner
- </em>
- 2
- src
- href
- <h6>
- <h1>
- False
- numbers
- line 2
- A happy dog
- alt
- False
- </html>
- <h6>
- has a closing tag
- <!DOCTYPE html>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids