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.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>Fun facts</h2>
<h2>Cricket is fun.</h2> -
2.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>I love mangoes.</p>
<p>Our school trip</p>
<h2>Hello, world!</h2>
<h2>My pets</h2> -
3.🔗 Where does this link open?
<a href="https://example.com" target="_blank">About us</a> (a) in a new tab (b) in the same tab - 4.Which of these has a closing tag? (a) <img> (b) <ul> (c) <br> (d) <hr>
- 5.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <h1> (d) <br>
- 6.🌐 Which one turns HTML into a page? (a) a code editor (b) a web server (c) a web browser
- 7.Which of these goes in the body? (a) <ul> (b) <link rel="stylesheet"> (c) <title> (d) <meta charset="utf-8">
-
8.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>Hello, world!</p>
<p>Cricket is fun.</p> (a) Fun facts (b) Cricket is fun. (c) Hello, world! -
9.🔗 Where does this link open?
<a href="quiz.html">School news</a> (a) in the same tab (b) in a new tab -
10.🔍 One closing tag is missing. Which one?
<h2>Hello, world!</h2>
<h1>Fun facts</h1>
<em>Good morning! (a) </h1> (b) </em> (c) </strong> (d) </h2> - 11.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
-
12.🔍 One closing tag is missing. Which one?
<b>Good morning!</b>
<h2>Cricket is fun.
<h1>The red kite</h1> (a) </small> (b) </h1> (c) </h2> (d) </b> -
13.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>I love mangoes.</p>
<h3>My pets</h3>
<p>My pets</p> -
14.📄 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) Class 7 Blog (c) Welcome! (d) Mars is red. -
15.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Grapes</li>
</ol> (a) bullets (b) numbers - 16.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h1>? (a) <h1> (b) <h3> (c) <h5> (d) <h6>
- 17.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em/> (c) <em> (d) </em>
- 18.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h1> or <h4>? (a) <h1> (b) <h4> (c) <h6> (d) <h3>
-
19.🔍 One closing tag is missing. Which one?
<h3>Our school trip
<strong>I love mangoes.</strong>
<h2>Hello, world!</h2> (a) </h2> (b) </strong> (c) </h3> (d) </em> - 20.🌐 Which one stores a website’s files? (a) a code editor (b) a web browser (c) a web server
- 21.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 22.True or false: <ul> is an empty tag. (a) False (b) True
-
23.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>The red kite</p>
<p>I love mangoes.</p> (a) My best friend (b) I love mangoes. (c) The red kite - 24.Which of these is an opening tag? (a) </p> (b) <p> (c) </title> (d) </body>
-
25.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>My drawings</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) Art Gallery (c) My drawings (d) body -
26.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>The red kite</p>
<p>Our school trip</p>
<p>Our school trip</p> - 27.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 28.📝 What does <hr> draw? (a) a line across the page (b) a picture (c) a link (d) a table
- 29.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
- 30.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 31.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h3> or <h2>? (a) <h6> (b) <h4> (c) <h2> (d) <h3>
- 32.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the body (d) the title
- 33.True or false: in <img>, src tells which image to load. (a) True (b) False
-
34.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="250"> -
35.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="250"> (a) Birthday cake (b) moon.png (c) cake.jpg (d) dog.jpg -
36.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>My pets</p>
<p>My best friend</p> -
37.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Hello, world!</p>
<p>Fun facts</p>
<!-- <p>Cricket is fun.</p> --> (a) Good morning! (b) Cricket is fun. (c) Hello, world! (d) Fun facts -
38.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Guava</li>
<li>Grapes</li>
</ul> -
39.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h4>The red kite</h4>
<h2>Rain today</h2>
<p>My best friend</p>
<p>I love mangoes.</p> -
40.🔍 One closing tag is missing. Which one?
<h1>My pets</h1>
<em>I love mangoes.</em>
<h3>My best friend (a) </h3> (b) </em> (c) </h1> (d) </strong>
Answer key
- 3
- 3
- in a new tab
- <ul>
- <h1>
- a web browser
- <ul>
- Fun facts
- in the same tab
- </em>
- to leave notes
- </h2>
- 2
- Class 7 Blog
- numbers
- <h1>
- </em>
- <h1>
- </h3>
- a web server
- an empty tag
- False
- My best friend
- <p>
- My drawings
- 1
- Yes
- a line across the page
- in the head
- in the head
- <h2>
- the body
- True
- 250
- cake.jpg
- 1
- Cricket is fun.
- 3
- 3
- </h3>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids