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 SMALLEST text: <h3>, <h2>, <h4> or <h1>? (a) <h4> (b) <h1> (c) <h3> (d) <h2>
- 2.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
- 3.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
4.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) Our school bus (b) width (c) An old fort (d) bus.jpg - 5.True or false: <p> goes in the body. (a) False (b) True
- 6.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) < (d) [
- 7.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
- 8.Which of these is a closing tag? (a) <li> (b) <h1> (c) </h1> (d) <body>
- 9.True or false: HTML on its own cannot run a game loop. (a) False (b) True
- 10.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <a> (d) <pic>
- 11.🔍 Which is the odd one out? (a) hosts websites online (b) turns HTML into a page (c) answers page requests (d) stores a website’s files
-
12.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Rain today</p>
<p>Cricket is fun.</p> - 13.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h1> (d) <h3>
-
14.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) body (b) Art Gallery (c) All about me (d) Try this poha. - 15.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
- 16.📝 What does <br> do? (a) adds a picture (b) makes a list (c) makes text bold (d) starts a new line
- 17.Which of these is a closing tag? (a) <title> (b) </p> (c) <h1> (d) <body>
- 18.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
- 19.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) in a big heading (d) on the browser tab
-
20.🔗 Which words do you click on?
<a href="https://example.com">Art corner</a> (a) href (b) https://example.com (c) School news (d) Art corner -
21.🔍 Which line is missing its closing tag?
line 1: <em>My pets</em>
line 2: <p>Hello, world!</p>
line 3: <h3>I love mangoes. (a) line 3 (b) line 2 (c) line 1 -
22.🔗 Which address opens when you click this link?
<a href="https://example.com">Play games</a> (a) art.html (b) maths.html (c) https://example.com (d) Play games -
23.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Grapes</li>
<li>Litchi</li>
<li>Mango</li>
</ul> - 24.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
-
25.🔍 One closing tag is missing. Which one?
<p>Good morning!
<i>The red kite</i>
<strong>I love mangoes.</strong> (a) </h2> (b) </strong> (c) </i> (d) </p> -
26.🔍 One closing tag is missing. Which one?
<h1>Fun facts</h1>
<em>I love mangoes.</em>
<h3>Cricket is fun. (a) </p> (b) </h1> (c) </h3> (d) </em> - 27.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 10 (c) 1 (d) 6
- 28.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
- 29.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h4> or <h3>? (a) <h3> (b) <h2> (c) <h4> (d) <h1>
- 30.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
-
31.🔗 Where does this link open?
<a href="games.html">Art corner</a> (a) in a new tab (b) in the same tab - 32.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h6> or <h2>? (a) <h4> (b) <h3> (c) <h2> (d) <h6>
-
33.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h2>My pets</h2>
<p>My best friend</p>
<p>Hello, world!</p> -
34.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>Rain today</p> -->
<p>My pets</p>
<p>Our school trip</p> - 35.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <ol> (d) <br>
-
36.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Match report</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) Match report (c) Space Facts (d) index.html -
37.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Cricket is fun.</p>
<!-- <p>Good morning!</p> --> -
38.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="150"> (a) Birthday cake (b) map.png (c) width (d) Map of India - 39.🔠 How many heading levels does HTML have? (a) 3 (b) 6 (c) 10 (d) 4
- 40.💬 How does an HTML comment start? (a) /* (b) <!-- (c) // (d) #
Answer key
- <h4>
- False
- a closing tag
- Our school bus
- True
- <
- a slash /
- </h1>
- True
- <img>
- turns HTML into a page
- 1
- <h6>
- All about me
- <h1>
- starts a new line
- </p>
- Yes
- on the browser tab
- Art corner
- line 3
- https://example.com
- 4
- in the body
- </p>
- </h3>
- 1
- <a>
- <h4>
- src
- in the same tab
- <h6>
- 2
- 2
- <ol>
- Space Facts
- 2
- Map of India
- 6
- <!--
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids