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.🔗 Which address opens when you click this link?
<a href="games.html">Maths fun</a> (a) Maths fun (b) about.html (c) games.html (d) contact.html -
2.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>My pets</p> -->
<p>Rain today</p>
<!-- <p>The red kite</p> --> -
3.🔍 One closing tag is missing. Which one?
<small>Hello, world!
<strong>I love mangoes.</strong>
<h2>Cricket is fun.</h2> (a) </h2> (b) </em> (c) </small> (d) </strong> -
4.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>My best friend</p>
<p>The red kite</p> (a) My pets (b) The red kite (c) My best friend -
5.🔍 One closing tag is missing. Which one?
<h2>My pets</h2>
<small>Rain today</small>
<h1>Our school trip (a) </small> (b) </h1> (c) </h2> (d) </em> - 6.Which of these has a closing tag? (a) <hr> (b) <h1> (c) <br> (d) <img>
- 7.Which of these is true of a web server? (a) opens web pages for us (b) shows pages from the web (c) is where we type code (d) stores a website’s files
-
8.🔍 Which line is missing its closing tag?
line 1: <b>Our school trip
line 2: <i>Hello, world!</i>
line 3: <u>My best friend</u> (a) line 3 (b) line 1 (c) line 2 - 9.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 10.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
- 11.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <h3> (d) <p>
-
12.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>Rain today</p>
<p>The red kite</p>
<p>My best friend</p>
<!-- <p>I love mangoes.</p> --> - 13.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
- 14.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
- 15.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <html> (c) </body> (d) </html>
- 16.True or false: <p> has a closing tag. (a) False (b) True
- 17.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
- 18.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h2>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
-
19.🔗 Which words do you click on?
<a href="news.html">Contact us</a> (a) news.html (b) href (c) Contact us (d) Visit the site - 20.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <br> (d) <p>
-
21.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>My best friend</p> --> - 22.Which of these goes in the head? (a) <h1> (b) <ul> (c) <meta charset="utf-8"> (d) <p>
-
23.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> --> - 24.💬 How does an HTML comment end? (a) */ (b) --> (c) // (d) >>
-
25.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Fun facts</p> -->
<p>Good morning!</p> - 26.True or false: in <img>, alt sets how tall it is. (a) False (b) True
-
27.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>My best friend</p>
<h4>Hello, world!</h4>
<p>My pets</p>
<p>Fun facts</p> -
28.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="300"> - 29.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
30.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>My drawings</h1>
<p>I like to read.</p>
</body>
</html> (a) index.html (b) I like to read. (c) Riya’s Recipes (d) My drawings - 31.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
- 32.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
- 33.🔍 Which is the odd one out? (a) shows line numbers (b) is where we type code (c) has an address bar (d) colours code to help us
- 34.🔤 In “HTML”, what does the L stand for? (a) Link (b) Laptop (c) Line (d) Language
-
35.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Rain today</p>
<p>My pets</p>
<h3>Our school trip</h3>
<p>My best friend</p> -
36.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Good morning!</p>
<!-- <p>Our school trip</p> -->
<p>Fun facts</p> (a) Our school trip (b) My pets (c) Good morning! (d) Fun facts - 37.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
- 38.🔍 Which is the odd one out? (a) colours code to help us (b) has an address bar (c) turns HTML into a page (d) shows pages from the web
-
39.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> - 40.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h1> or <h3>? (a) <h4> (b) <h2> (c) <h3> (d) <h1>
Answer key
- games.html
- 1
- </small>
- My pets
- </h1>
- <h1>
- stores a website’s files
- line 1
- has a closing tag
- opens it in a new tab
- <h6>
- 4
- in the body
- to leave notes
- </html>
- True
- False
- <h6>
- Contact us
- <h1>
- 1
- <meta charset="utf-8">
- 1
- -->
- 1
- False
- 2
- 300
- No
- Riya’s Recipes
- href
- Yes
- has an address bar
- Language
- 2
- Our school trip
- a web server
- colours code to help us
- 250
- <h4>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids