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.🔍 One closing tag is missing. Which one?
<h3>Good morning!
<i>Our school trip</i>
<p>Rain today</p> (a) </em> (b) </h3> (c) </p> (d) </i> - 2.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
- 3.True or false: <title> goes in the body. (a) True (b) False
- 4.Which of these is a closing tag? (a) <p> (b) <body> (c) </body> (d) <h1>
- 5.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
-
6.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Planets</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Planets (b) Class 7 Blog (c) body (d) Here is my best one. - 7.Which of these has a closing tag? (a) <ul> (b) <hr> (c) <br> (d) <input>
- 8.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
- 9.True or false: a code editor turns HTML into a page. (a) True (b) False
- 10.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) alt (d) width
-
11.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="50"> (a) A red kite (b) cake.jpg (c) kite.png (d) map.png - 12.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
- 13.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
- 14.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h6> (d) <h1>
- 15.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a hash # (c) a dot . (d) a dollar $
-
16.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> -->
<p>Rain today</p>
<p>The red kite</p> (a) Fun facts (b) Rain today (c) I love mangoes. (d) The red kite - 17.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 18.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to load it faster (c) to make it bigger (d) to colour it
- 19.💬 How does an HTML comment end? (a) >> (b) --> (c) // (d) */
-
20.📋 Does this list show bullets or numbers?
<ol>
<li>Litchi</li>
<li>Grapes</li>
<li>Papaya</li>
</ol> (a) numbers (b) bullets -
21.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>The red kite</p> -->
<!-- <p>My pets</p> --> -
22.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Grapes</li>
<li>Guava</li>
</ol> (a) numbers (b) bullets - 23.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 1 (d) 6
-
24.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red</p> - 25.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) address (d) editor
- 26.True or false: in <img>, height sets how tall it is. (a) True (b) False
-
27.🔗 Where does this link open?
<a href="art.html">Contact us</a> (a) in a new tab (b) in the same tab - 28.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
29.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p>
<p>Rain today</p> (a) Fun facts (b) Rain today (c) I love mangoes. - 30.🔗 Which attribute holds the address of a link? (a) src (b) id (c) href (d) alt
- 31.💬 How does an HTML comment start? (a) <!-- (b) # (c) // (d) /*
- 32.📄 Can HTML on its own count button clicks? (a) No (b) Yes
-
33.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>The red kite</p>
<h4>Hello, world!</h4> -
34.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) index.html (b) Mars is red. (c) Class 7 Blog (d) Welcome! - 35.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 36.True or false: <img> is an empty tag. (a) True (b) False
- 37.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as one space (d) as a new line
-
38.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) Class 7 Blog (c) All about me (d) Thanks for visiting. -
39.🔗 Which address opens when you click this link?
<a href="quiz.html">School news</a> (a) quiz.html (b) about.html (c) School news (d) games.html -
40.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Birds sing<br>Sky is blue</p>
Answer key
- </h3>
- True
- False
- </body>
- a web browser
- Planets
- <ul>
- <a href="about.html">
- False
- src
- kite.png
- <h1>
- to leave notes
- <h6>
- a slash /
- Fun facts
- an opening tag
- to describe the image
- -->
- numbers
- 1
- numbers
- 1
- 2
- element
- True
- in the same tab
- a closing tag
- Fun facts
- href
- <!--
- No
- 2
- Class 7 Blog
- Yes
- True
- as one space
- Class 7 Blog
- quiz.html
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids