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.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 2.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
-
3.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) Riya’s Recipes (b) body (c) All about me (d) Try this poha. - 4.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2/> (c) </h2> (d) <h2>
-
5.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="350"> (a) Map of India (b) cake.jpg (c) map.png (d) dog.jpg - 6.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
-
7.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>My drawings</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) Art Gallery (c) My drawings (d) Thanks for visiting. - 8.Which of these is a closing tag? (a) <body> (b) <h1> (c) <title> (d) </p>
- 9.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h5>? (a) <h2> (b) <h5> (c) <h6> (d) <h1>
-
10.🔍 One closing tag is missing. Which one?
<h1>I love mangoes.</h1>
<b>Rain today</b>
<p>Good morning! (a) </p> (b) </b> (c) </h1> (d) </i> -
11.🔍 Which line is missing its closing tag?
line 1: <em>Good morning!</em>
line 2: <p>My pets
line 3: <u>My best friend</u> (a) line 1 (b) line 2 (c) line 3 - 12.🔠 Which tag is the least important heading? (a) <h6> (b) <h3> (c) <h1> (d) <p>
- 13.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
14.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>My pets</p>
<p>Rain today</p> (a) Rain today (b) My best friend (c) My pets - 15.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h1> or <h2>? (a) <h1> (b) <h4> (c) <h3> (d) <h2>
-
16.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="50"> (a) Birthday cake (b) Map of India (c) map.png (d) width - 17.📛 In <a href="x.html">, what is href? (a) a comment (b) an attribute (c) an element name (d) a closing tag
- 18.True or false: <title> has a closing tag. (a) True (b) False
- 19.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) saves our .html files (d) turns HTML into a page
-
20.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Jamun</li>
</ol> - 21.Which of these has a closing tag? (a) <br> (b) <ul> (c) <img> (d) <hr>
- 22.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 23.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 24.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 1 (d) 10
-
25.🔗 Where does this link open?
<a href="news.html">Take the quiz</a> (a) in the same tab (b) in a new tab - 26.🖼️ Which attribute of <img> describes the picture? (a) height (b) src (c) width (d) alt
- 27.🌐 Which one has an address bar? (a) a web browser (b) a web server (c) a code editor
- 28.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) saves our .html files (d) stores a website’s files
- 29.🖼️ Which attribute of <img> tells which image to load? (a) src (b) width (c) height (d) alt
-
30.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>My pets</p>
<p>Good morning!</p>
<p>Fun facts</p> -
31.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) Art Gallery (c) index.html (d) Easy snacks - 32.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
- 33.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
34.🔗 Where does this link open?
<a href="art.html" target="_blank">School news</a> (a) in a new tab (b) in the same tab -
35.🔗 Which words do you click on?
<a href="games.html">About us</a> (a) Contact us (b) About us (c) games.html (d) href - 36.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
-
37.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Match report</h1>
<p>Try this poha.</p>
</body>
</html> (a) Art Gallery (b) index.html (c) Match report (d) Try this poha. - 38.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Link (d) Language
- 39.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
- 40.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <h1> (d) <link rel="stylesheet">
Answer key
- an empty tag
- <!DOCTYPE html>
- All about me
- </h2>
- map.png
- Yes
- Art Gallery
- </p>
- <h1>
- </p>
- line 2
- <h6>
- an opening tag
- My best friend
- <h1>
- Map of India
- an attribute
- True
- turns HTML into a page
- 2
- <ul>
- a closing tag
- has a closing tag
- 1
- in the same tab
- alt
- a web browser
- stores a website’s files
- src
- 4
- Art Gallery
- <!--
- Yes
- in a new tab
- About us
- False
- Art Gallery
- Language
- in the body
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids