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 of these is an empty tag? (a) <br> (b) <li> (c) <p> (d) <title>
- 2.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) editor (c) address (d) attribute
- 3.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
-
4.📄 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>We won by 5 runs.</p>
</body>
</html> (a) Riya’s Recipes (b) We won by 5 runs. (c) index.html (d) Match report -
5.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Rain today</p>
<p>My pets</p> (a) Our school trip (b) My pets (c) Rain today -
6.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p>
<p>Fun facts</p>
<p>My best friend</p> (a) Fun facts (b) Hello, world! (c) Good morning! (d) My best friend - 7.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 8.🏷️ HTML marks up text using ___. (a) keys (b) wires (c) tags (d) pixels
- 9.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) makes it blank (d) hides the link
- 10.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
-
11.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="250"> (a) cake.jpg (b) Map of India (c) dog.jpg (d) map.png -
12.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="300"> (a) Map of India (b) width (c) map.png (d) Birthday cake - 13.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 14.Which of these is a closing tag? (a) <h1> (b) <li> (c) </b> (d) <title>
- 15.🔢 In a basic web page file, which comes first: “<body>” or “</body>”? (a) </body> (b) <body>
- 16.Which of these goes in the head? (a) <p> (b) <link rel="stylesheet"> (c) <a> (d) <table>
- 17.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
- 18.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 19.True or false: <li> is one item of a list. (a) False (b) True
- 20.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <body> (c) <html> (d) <head>
-
21.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>My best friend</p> -->
<p>Fun facts</p> (a) Fun facts (b) My best friend (c) Good morning! -
22.🔗 Where does this link open?
<a href="about.html">Maths fun</a> (a) in a new tab (b) in the same tab -
23.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Good morning!</p>
<p>Fun facts</p>
<h2>I love mangoes.</h2>
<p>The red kite</p> - 24.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
-
25.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Guava</li>
<li>Papaya</li>
<li>Mango</li>
<li>Litchi</li>
</ol> -
26.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) Class 7 Blog (c) index.html (d) Easy snacks - 27.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the doctype (d) the body
- 28.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
- 29.🔍 Which is the odd one out? (a) is where we type code (b) hosts websites online (c) answers page requests (d) stores a website’s files
-
30.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>Good morning!</p>
<p>Rain today</p>
<p>Cricket is fun.</p>
<p>My pets</p>
<p>The red kite</p> - 31.True or false: <title> has a closing tag. (a) True (b) False
- 32.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
-
33.📋 What number does the browser show next to “Banana”?
<ol start="8">
<li>Papaya</li>
<li>Guava</li>
<li>Banana</li>
</ol> -
34.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red<br>Birds sing<br>Kites fly high<br>Sky is blue</p> -
35.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Papaya</li>
<li>Guava</li>
</ul> (a) numbers (b) bullets - 36.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h4> or <h6>? (a) <h6> (b) <h3> (c) <h1> (d) <h4>
- 37.True or false: <title> is an empty tag. (a) False (b) True
- 38.🔍 Which is the odd one out? (a) is where we type code (b) saves our .html files (c) colours code to help us (d) shows pages from the web
- 39.True or false: in <img>, src tells which image to load. (a) True (b) False
- 40.True or false: HTML on its own can make links to pages. (a) False (b) True
Answer key
- <br>
- element
- <!DOCTYPE html>
- Riya’s Recipes
- Our school trip
- Hello, world!
- No
- tags
- opens it in a new tab
- <li>
- map.png
- Map of India
- a closing tag
- </b>
- <body>
- <link rel="stylesheet">
- a web server
- an empty tag
- True
- </html>
- My best friend
- in the same tab
- 2
- in the body
- 5
- Class 7 Blog
- the body
- a web browser
- is where we type code
- 6
- True
- -->
- 10
- 5
- bullets
- <h1>
- False
- shows pages from the web
- True
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids