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 heading shows the BIGGEST text: <h2>, <h6>, <h4> or <h1>? (a) <h2> (b) <h1> (c) <h6> (d) <h4>
-
2.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine<br>Rivers flow</p> - 3.True or false: in <img>, height sets how wide it is. (a) True (b) False
- 4.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) src (d) width
- 5.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
6.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p>
<p>Cricket is fun.</p> (a) Cricket is fun. (b) Hello, world! (c) Good morning! -
7.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>Fun facts</h2>
<p>I love mangoes.</p> -
8.🔍 Which line is missing its closing tag?
line 1: <u>Cricket is fun.</u>
line 2: <p>Fun facts</p>
line 3: <i>My pets (a) line 1 (b) line 2 (c) line 3 -
9.🔗 Which words do you click on?
<a href="https://example.com">Contact us</a> (a) Visit the site (b) href (c) Contact us (d) https://example.com - 10.True or false: in <img>, width sets how wide it is. (a) False (b) True
- 11.🔍 Which is the odd one out? (a) saves our .html files (b) answers page requests (c) colours code to help us (d) is where we type code
- 12.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
- 13.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <p> (d) <li>
- 14.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
- 15.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
16.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="150"> -
17.🔗 Which address opens when you click this link?
<a href="news.html">Visit the site</a> (a) Visit the site (b) quiz.html (c) games.html (d) news.html -
18.🔍 One closing tag is missing. Which one?
<i>I love mangoes.
<u>The red kite</u>
<h3>Our school trip</h3> (a) </b> (b) </u> (c) </h3> (d) </i> - 19.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
20.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Class 7 Blog (b) Here is my best one. (c) Welcome! (d) index.html - 21.📄 Can HTML on its own make headings? (a) Yes (b) No
-
22.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>Fun facts</h2>
<h3>I love mangoes.</h3>
<p>Rain today</p>
<h3>Our school trip</h3> - 23.True or false: <style> goes in the head. (a) False (b) True
-
24.🔍 One closing tag is missing. Which one?
<h3>My pets</h3>
<em>I love mangoes.</em>
<h1>The red kite (a) </h3> (b) </small> (c) </h1> (d) </em> - 25.True or false: <ul> goes in the head. (a) True (b) False
- 26.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h2>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
- 27.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
- 28.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h4> or <h2>? (a) <h5> (b) <h4> (c) <h6> (d) <h2>
- 29.Which of these is an empty tag? (a) <hr> (b) <b> (c) <p> (d) <ul>
-
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="350"> (a) width (b) Birthday cake (c) cake.jpg (d) A happy dog - 31.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h1> (d) <h3>
- 32.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
-
33.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) href (b) Visit the site (c) contact.html (d) Maths fun - 34.🏷️ Which is the closing tag for <p>? (a) <\p> (b) <p> (c) </p> (d) <p/>
- 35.True or false: <ul> lists things in any order. (a) False (b) True
- 36.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h6>
- 37.True or false: <img> has a closing tag. (a) True (b) False
- 38.True or false: <br> has a closing tag. (a) True (b) False
- 39.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) editor (d) element
- 40.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Machine (d) Mouse
Answer key
- <h1>
- 3
- False
- src
- an opening tag
- Hello, world!
- 2
- line 3
- Contact us
- True
- answers page requests
- in the body
- <li>
- Yes
- a closing tag
- 150
- news.html
- </i>
- No
- Class 7 Blog
- Yes
- 4
- True
- </h1>
- False
- <h1>
- <img>
- <h6>
- <hr>
- Birthday cake
- <h6>
- href
- Visit the site
- </p>
- True
- <h1>
- False
- False
- element
- Markup
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids