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 is the closing tag for <b>? (a) <\b> (b) </b> (c) <b> (d) <b/>
- 2.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 3.True or false: HTML on its own cannot keep a high score. (a) True (b) False
-
4.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Papaya</li>
<li>Orange</li>
<li>Grapes</li>
</ul> - 5.Which of these goes in the head? (a) <p> (b) <ul> (c) <a> (d) <meta charset="utf-8">
-
6.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="100"> (a) cake.jpg (b) moon.png (c) Birthday cake (d) dog.jpg - 7.📄 Can HTML on its own make links to pages? (a) Yes (b) No
-
8.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Cricket is fun.</p>
<p>Rain today</p>
<p>Good morning!</p>
<h2>Fun facts</h2>
<p>My pets</p> - 9.Which of these is true of a web browser? (a) stores a website’s files (b) shows line numbers (c) is where we type code (d) has an address bar
- 10.True or false: HTML on its own cannot make tables. (a) False (b) True
- 11.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <h1> (d) <br>
-
12.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) body (c) Class 7 Blog (d) All about me - 13.🏷️ Which is the closing tag for <small>? (a) <small> (b) </small> (c) <\small> (d) <small/>
- 14.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) </h1> (d) <h1>
- 15.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) address (d) element
- 16.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h1>? (a) <h5> (b) <h1> (c) <h3> (d) <h2>
-
17.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="350"> -
18.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>My best friend</p> -->
<p>I love mangoes.</p>
<!-- <p>Rain today</p> --> -
19.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high<br>Roses are red<br>Birds sing<br>Rivers flow</p> -
20.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h3>Good morning!</h3>
<h3>My pets</h3>
<p>My best friend</p>
<h3>Our school trip</h3> - 21.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
22.📋 What number does the browser show next to “Grapes”?
<ol start="7">
<li>Mango</li>
<li>Orange</li>
<li>Guava</li>
<li>Grapes</li>
</ol> - 23.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) saves our .html files (d) hosts websites online
- 24.True or false: <ol> is an unordered list. (a) True (b) False
- 25.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h4> or <h3>? (a) <h5> (b) <h4> (c) <h3> (d) <h2>
- 26.True or false: <ul> lists steps in order. (a) True (b) False
- 27.Which of these goes in the head? (a) <h1> (b) <ul> (c) <img> (d) <style>
- 28.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <a> (c) <h1> (d) <ul>
-
29.📋 What number does the browser show next to “Mango”?
<ol>
<li>Papaya</li>
<li>Guava</li>
<li>Orange</li>
<li>Mango</li>
<li>Banana</li>
</ol> - 30.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h5>? (a) <h5> (b) <h4> (c) <h1> (d) <h2>
-
31.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Banana</li>
<li>Grapes</li>
<li>Papaya</li>
</ol> - 32.True or false: <ol> lists things in any order. (a) False (b) True
-
33.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>I like to read.</p>
</body>
</html> (a) Match report (b) Riya’s Recipes (c) index.html (d) I like to read. -
34.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="250"> (a) width (b) Map of India (c) kite.png (d) A red kite -
35.📋 What number does the browser show next to “Orange”?
<ol>
<li>Guava</li>
<li>Orange</li>
<li>Litchi</li>
</ol> - 36.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the head (d) the title
-
37.🔍 Which line is missing its closing tag?
line 1: <h3>My best friend</h3>
line 2: <u>Hello, world!
line 3: <strong>My pets</strong> (a) line 1 (b) line 2 (c) line 3 - 38.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h6> or <h3>? (a) <h3> (b) <h1> (c) <h6> (d) <h5>
- 39.Which of these is true of a web server? (a) turns HTML into a page (b) saves our .html files (c) sends pages over the net (d) opens web pages for us
-
40.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="300">
Answer key
- </b>
- No
- True
- 4
- <meta charset="utf-8">
- cake.jpg
- Yes
- 5
- has an address bar
- False
- <h1>
- All about me
- </small>
- </h1>
- element
- <h1>
- 350
- 1
- 5
- 4
- has a closing tag
- 10
- hosts websites online
- False
- <h5>
- False
- <style>
- <link rel="stylesheet">
- 4
- <h1>
- 4
- False
- Riya’s Recipes
- A red kite
- 2
- the body
- line 2
- <h6>
- sends pages over the net
- 300
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids