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 tag is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
- 2.Which of these goes in the body? (a) <a> (b) <meta charset="utf-8"> (c) <link rel="stylesheet"> (d) <style>
- 3.True or false: HTML on its own can make bullet lists. (a) True (b) False
- 4.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as 5 spaces (c) as a dot (d) as a new line
-
5.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="150"> (a) Map of India (b) dog.jpg (c) cake.jpg (d) map.png - 6.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) src (d) id
- 7.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) src (c) height (d) alt
- 8.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
-
9.🔍 One closing tag is missing. Which one?
<h1>I love mangoes.
<i>My pets</i>
<u>Cricket is fun.</u> (a) </b> (b) </i> (c) </h1> (d) </u> - 10.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
-
11.🔗 Which address opens when you click this link?
<a href="about.html">Art corner</a> (a) https://example.com (b) contact.html (c) Art corner (d) about.html - 12.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h5>? (a) <h5> (b) <h4> (c) <h3> (d) <h2>
-
13.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Fun facts</p> --> -
14.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>My pets</p> -->
<!-- <p>Fun facts</p> -->
<!-- <p>The red kite</p> -->
<p>My best friend</p> - 15.Which of these goes in the head? (a) <a> (b) <meta charset="utf-8"> (c) <p> (d) <ul>
-
16.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="200"> - 17.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 18.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 19.🏷️ Every HTML tag starts with which sign? (a) < (b) [ (c) { (d) (
- 20.🌐 Which one stores a website’s files? (a) a web server (b) a web browser (c) a code editor
- 21.Which of these is true of a web browser? (a) opens web pages for us (b) saves our .html files (c) shows line numbers (d) colours code to help us
-
22.📄 What is the big heading shown on 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) Class 7 Blog (b) body (c) Easy snacks (d) We won by 5 runs. - 23.True or false: a web server stores a website’s files. (a) False (b) True
-
24.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Sky is blue<br>Kites fly high<br>Rivers flow</p> - 25.Which of these goes in the body? (a) <title> (b) <style> (c) <meta charset="utf-8"> (d) <img>
- 26.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
-
27.🔍 One closing tag is missing. Which one?
<strong>Good morning!
<b>The red kite</b>
<h1>My pets</h1> (a) </h1> (b) </strong> (c) </b> (d) </p> -
28.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) Easy snacks (b) Try this poha. (c) body (d) Space Facts - 29.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h2> or <h4>? (a) <h6> (b) <h1> (c) <h2> (d) <h4>
-
30.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>My best friend</p>
<p>My pets</p> (a) My pets (b) My best friend (c) I love mangoes. -
31.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Orange</li>
</ul> (a) numbers (b) bullets - 32.True or false: in <img>, alt names the picture file. (a) False (b) True
-
33.🔍 One closing tag is missing. Which one?
<b>The red kite
<h3>Rain today</h3>
<h2>I love mangoes.</h2> (a) </b> (b) </h3> (c) </h2> (d) </small> - 34.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
- 35.🔢 In a basic web page file, which comes LAST? (a) </html> (b) </head> (c) <html> (d) <!DOCTYPE html>
-
36.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Guava</li>
<li>Banana</li>
<li>Orange</li>
<li>Jamun</li>
<li>Mango</li>
</ul> - 37.True or false: <table> goes in the body. (a) True (b) False
- 38.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
-
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="200"> (a) width (b) The full moon (c) Our school bus (d) moon.png - 40.Which of these has a closing tag? (a) <br> (b) <meta> (c) <b> (d) <img>
Answer key
- <h1>
- <a>
- True
- as one space
- map.png
- href
- alt
- in the body
- </h1>
- <a href="about.html">
- about.html
- <h5>
- 1
- 1
- <meta charset="utf-8">
- 200
- No
- an opening tag
- <
- a web server
- opens web pages for us
- Easy snacks
- True
- 4
- <img>
- a code editor
- </strong>
- Easy snacks
- <h6>
- I love mangoes.
- bullets
- False
- </b>
- Yes
- </html>
- 6
- True
- <li>
- The full moon
- <b>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids