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.True or false: in <img>, alt names the picture file. (a) False (b) True
-
2.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Guava</li>
<li>Mango</li>
</ol> -
3.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>My best friend</p>
<p>Our school trip</p>
<h3>Hello, world!</h3>
<h2>My pets</h2> -
4.🔗 Where does this link open?
<a href="about.html" target="_blank">Maths fun</a> (a) in a new tab (b) in the same tab - 5.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 6.True or false: <ol> is one item of a list. (a) False (b) True
-
7.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Cricket is fun.</p>
<p>Fun facts</p>
<h2>My best friend</h2> - 8.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 9.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the title (d) the doctype
-
10.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Our school trip</p>
<p>My pets</p>
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> --> - 11.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
12.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Cricket Club (b) Here is my best one. (c) body (d) Welcome! -
13.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high<br>Sky is blue</p> - 14.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h4>? (a) <h3> (b) <h2> (c) <h4> (d) <h6>
- 15.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h3> (d) <h6>
-
16.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>I love mangoes.</h4>
<h2>Rain today</h2>
<p>Rain today</p> - 17.Which of these is an opening tag? (a) </p> (b) <h1> (c) </b> (d) </li>
-
18.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Guava</li>
<li>Jamun</li>
</ul> (a) bullets (b) numbers - 19.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 4 (d) 10
- 20.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
-
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="400"> (a) An old fort (b) width (c) bus.jpg (d) Our school bus - 22.🔍 Which is the odd one out? (a) sends pages over the net (b) hosts websites online (c) stores a website’s files (d) opens web pages for us
- 23.📝 What does <hr> draw? (a) a table (b) a link (c) a picture (d) a line across the page
- 24.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
-
25.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Fun facts</p>
<h4>Our school trip</h4>
<p>Good morning!</p>
<p>I love mangoes.</p> -
26.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Orange</li>
</ul> (a) numbers (b) bullets - 27.🔗 What does HyperText mean? (a) text with links (b) text in colour (c) secret text (d) very big text
-
28.🔍 Which line is missing its closing tag?
line 1: <i>Fun facts</i>
line 2: <u>The red kite</u>
line 3: <p>My best friend (a) line 1 (b) line 3 (c) line 2 -
29.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="200"> - 30.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <html> (c) </body> (d) <head>
-
31.🔗 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 -
32.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>Cricket is fun.</h2>
<h2>I love mangoes.</h2> -
33.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Rain today</p>
<h4>My pets</h4>
<p>Cricket is fun.</p>
<p>My pets</p> - 34.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to describe the image (d) to load it faster
-
35.🔗 Which words do you click on?
<a href="maths.html">Contact us</a> (a) Contact us (b) href (c) maths.html (d) Visit the site -
36.📋 What number does the browser show next to “Banana”?
<ol>
<li>Guava</li>
<li>Orange</li>
<li>Banana</li>
</ol> -
37.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Good morning!</p> -->
<!-- <p>Hello, world!</p> -->
<p>The red kite</p>
<p>Fun facts</p> - 38.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
- 39.🔢 In a basic web page file, which comes first: “</body>” or “<body>”? (a) </body> (b) <body>
- 40.Which of these is a closing tag? (a) <b> (b) <li> (c) <title> (d) </title>
Answer key
- False
- 3
- 3
- in a new tab
- Yes
- False
- 2
- has a closing tag
- the body
- 3
- an empty tag
- Welcome!
- 3
- <h6>
- <h6>
- 3
- <h1>
- bullets
- 6
- <ul>
- Our school bus
- opens web pages for us
- a line across the page
- on the browser tab
- 2
- bullets
- text with links
- line 3
- 200
- </html>
- in a new tab
- 1
- 2
- to describe the image
- Contact us
- 3
- 2
- <ol>
- <body>
- </title>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids