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.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 2.True or false: a web browser answers page requests. (a) False (b) True
- 3.Which of these is true of a web browser? (a) colours code to help us (b) stores a website’s files (c) saves our .html files (d) opens web pages for us
- 4.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h4> or <h2>? (a) <h2> (b) <h3> (c) <h6> (d) <h4>
-
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="50"> (a) Our school bus (b) bus.jpg (c) width (d) An old fort - 6.True or false: HTML on its own can make tables. (a) False (b) True
- 7.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <hr> (d) <ul>
- 8.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) saves our .html files (d) sends pages over the net
-
9.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>I love mangoes.</p>
<h3>Our school trip</h3>
<h2>Our school trip</h2> - 10.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <ul> (c) <img> (d) <p>
- 11.Which of these has a closing tag? (a) <input> (b) <br> (c) <img> (d) <h1>
-
12.🔗 Where does this link open?
<a href="games.html">School news</a> (a) in the same tab (b) in a new tab -
13.🔍 Which line is missing its closing tag?
line 1: <h3>I love mangoes.
line 2: <b>Good morning!</b>
line 3: <h2>Fun facts</h2> (a) line 2 (b) line 1 (c) line 3 -
14.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) body (b) I like to read. (c) Planets (d) Cricket Club - 15.True or false: a web server colours code to help us. (a) True (b) False
-
16.🔗 Which words do you click on?
<a href="https://example.com">School news</a> (a) href (b) https://example.com (c) Take the quiz (d) School news -
17.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="300"> (a) Map of India (b) map.png (c) dog.jpg (d) cake.jpg -
18.🔗 Which words do you click on?
<a href="games.html">School news</a> (a) Take the quiz (b) games.html (c) School news (d) href -
19.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Good morning!</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>My best friend</p> --> - 20.Which of these is an opening tag? (a) </li> (b) </body> (c) <body> (d) </h1>
- 21.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
-
22.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>I love mangoes.</p> -->
<p>Fun facts</p>
<p>Our school trip</p>
<p>Cricket is fun.</p> -
23.🔍 Which line is missing its closing tag?
line 1: <p>Our school trip
line 2: <h3>Fun facts</h3>
line 3: <b>Good morning!</b> (a) line 3 (b) line 2 (c) line 1 -
24.🔍 One closing tag is missing. Which one?
<strong>I love mangoes.</strong>
<h2>My best friend</h2>
<h1>Rain today (a) </small> (b) </strong> (c) </h2> (d) </h1> - 25.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h5> or <h1>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
- 26.🖼️ Which attribute of <img> names the picture file? (a) alt (b) src (c) width (d) height
- 27.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h6> or <h2>? (a) <h3> (b) <h2> (c) <h6> (d) <h1>
-
28.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Hello, world!</p>
<!-- <p>The red kite</p> -->
<p>My best friend</p> (a) I love mangoes. (b) My best friend (c) The red kite (d) Hello, world! -
29.🔍 One closing tag is missing. Which one?
<i>I love mangoes.</i>
<h1>The red kite
<h3>Fun facts</h3> (a) </h3> (b) </h2> (c) </i> (d) </h1> - 30.True or false: HTML on its own can pick a random number. (a) False (b) True
-
31.📋 What number does the browser show next to “Guava”?
<ol>
<li>Litchi</li>
<li>Mango</li>
<li>Guava</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Banana</li>
</ol> -
32.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Grapes</li>
<li>Litchi</li>
<li>Banana</li>
</ol> - 33.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h5>? (a) <h2> (b) <h5> (c) <h6> (d) <h1>
- 34.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
- 35.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as one space (c) as 5 spaces (d) as a dot
-
36.🔗 Which address opens when you click this link?
<a href="maths.html">Visit the site</a> (a) art.html (b) maths.html (c) news.html (d) Visit the site - 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: “<head>” or “<body>”? (a) <head> (b) <body>
-
39.🔍 Which line is missing its closing tag?
line 1: <h2>Hello, world!
line 2: <small>Cricket is fun.</small>
line 3: <h1>Fun facts</h1> (a) line 1 (b) line 2 (c) line 3 - 40.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
Answer key
- in the head
- False
- opens web pages for us
- <h2>
- Our school bus
- True
- <ul>
- sends pages over the net
- 3
- <meta charset="utf-8">
- <h1>
- in the same tab
- line 1
- Planets
- False
- School news
- map.png
- School news
- 1
- <body>
- a line across the page
- 4
- line 1
- </h1>
- <h1>
- src
- <h1>
- The red kite
- </h1>
- False
- 3
- 2
- <h6>
- <ol>
- as one space
- maths.html
- to leave notes
- <head>
- line 1
- <ol>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids