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.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Birds sing<br>Sky is blue<br>Stars shine</p> - 2.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to colour it (d) to load it faster
-
3.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="150"> (a) map.png (b) dog.jpg (c) cake.jpg (d) Map of India - 4.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a dollar $ (d) a hash #
-
5.📋 What number does the browser show next to “Mango”?
<ol>
<li>Banana</li>
<li>Mango</li>
<li>Jamun</li>
</ol> - 6.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <h1> (d) <link rel="stylesheet">
- 7.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
-
8.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>My drawings</h1>
<p>Try this poha.</p>
</body>
</html> (a) index.html (b) Space Facts (c) My drawings (d) Try this poha. -
9.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Cricket is fun.</p>
<h2>My best friend</h2> -
10.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Stars shine</p> -
11.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Planets</h1>
<p>Try this poha.</p>
</body>
</html> (a) Art Gallery (b) Planets (c) Try this poha. (d) index.html -
12.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>My best friend</p> -->
<p>Fun facts</p>
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> --> - 13.True or false: <ul> is an unordered list. (a) False (b) True
- 14.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) width (d) src
- 15.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ul> (d) <ol>
- 16.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h4> or <h5>? (a) <h6> (b) <h4> (c) <h3> (d) <h5>
- 17.Which of these is a closing tag? (a) <p> (b) <h1> (c) <b> (d) </h1>
- 18.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <p> (d) <ul>
-
19.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue<br>Stars shine</p> -
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="250"> (a) Birthday cake (b) map.png (c) width (d) Map of India - 21.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
- 22.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 23.🌐 Which one sends pages over the net? (a) a code editor (b) a web server (c) a web browser
- 24.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h4> or <h1>? (a) <h3> (b) <h4> (c) <h6> (d) <h1>
- 25.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
- 26.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
-
27.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>The red kite</p>
<h2>Fun facts</h2>
<h3>The red kite</h3>
<h2>My best friend</h2> - 28.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
- 29.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 10 (d) 3
- 30.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
- 31.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the head (d) the doctype
- 32.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small> (c) </small> (d) <small/>
- 33.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
34.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Rain today</p>
<p>My pets</p>
<!-- <p>The red kite</p> --> (a) I love mangoes. (b) My pets (c) Rain today (d) The red kite -
35.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>My best friend</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>Rain today</p> -->
<!-- <p>Fun facts</p> --> -
36.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Banana</li>
</ul> - 37.🔢 In a basic web page file, which comes LAST? (a) </body> (b) </head> (c) </html> (d) <head>
- 38.Which of these goes in the head? (a) <p> (b) <meta charset="utf-8"> (c) <a> (d) <h1>
- 39.True or false: <li> is one item of a list. (a) False (b) True
- 40.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a link (d) a table
Answer key
- 5
- to describe the image
- map.png
- a slash /
- 2
- <h1>
- <a>
- Space Facts
- 2
- 2
- Art Gallery
- 3
- True
- alt
- <ol>
- <h3>
- </h1>
- <li>
- 3
- Map of India
- <ol>
- No
- a web server
- <h6>
- a code editor
- in the body
- 4
- <ul>
- 6
- in the body
- the body
- </small>
- a closing tag
- The red kite
- 1
- 2
- </html>
- <meta charset="utf-8">
- True
- a line across the page
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids