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.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Rivers flow</p> - 2.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h2> or <h6>? (a) <h6> (b) <h4> (c) <h2> (d) <h3>
-
3.🔗 Which address opens when you click this link?
<a href="https://example.com">Visit the site</a> (a) https://example.com (b) Visit the site (c) maths.html (d) art.html - 4.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <ul> (d) <hr>
- 5.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
6.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>The red kite</p> -->
<!-- <p>Rain today</p> -->
<p>Good morning!</p> - 7.🔢 In a basic web page file, which comes first: “<body>” or “</body>”? (a) </body> (b) <body>
-
8.🔍 One closing tag is missing. Which one?
<h2>Fun facts
<p>Good morning!</p>
<h1>The red kite</h1> (a) </p> (b) </h1> (c) </em> (d) </h2> -
9.🔗 Which address opens when you click this link?
<a href="games.html">About us</a> (a) contact.html (b) about.html (c) games.html (d) About us - 10.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 11.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
- 12.📝 What does <br> do? (a) starts a new line (b) makes a list (c) makes text bold (d) adds a picture
-
13.🔗 Where does this link open?
<a href="about.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab - 14.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as 5 spaces (c) as a dot (d) as one space
- 15.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
- 16.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <p> (d) <img>
- 17.🔢 In a basic web page file, which comes first: “</body>” or “<body>”? (a) <body> (b) </body>
-
18.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Fun facts</p>
<p>Rain today</p> (a) My pets (b) Fun facts (c) Rain today - 19.🔢 In a basic web page file, which comes first: “</body>” or “</head>”? (a) </head> (b) </body>
-
20.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>Try this poha.</p>
</body>
</html> (a) Cricket Club (b) body (c) Try this poha. (d) Planets -
21.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Jamun</li>
<li>Mango</li>
<li>Banana</li>
</ol> -
22.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) index.html (b) Here is my best one. (c) Welcome! (d) Art Gallery -
23.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>I love mangoes.</p>
<h3>I love mangoes.</h3>
<p>My pets</p>
<h2>My best friend</h2> - 24.📋 Which list tag is one item of a list? (a) <li> (b) <ul> (c) <ol>
-
25.🔍 One closing tag is missing. Which one?
<h1>Rain today</h1>
<b>I love mangoes.</b>
<u>Hello, world! (a) </h1> (b) </p> (c) </u> (d) </b> - 26.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
-
27.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Rain today</p>
<p>My best friend</p>
<h3>I love mangoes.</h3> -
28.🔗 Which address opens when you click this link?
<a href="quiz.html">About us</a> (a) games.html (b) about.html (c) About us (d) quiz.html - 29.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h4>? (a) <h2> (b) <h6> (c) <h1> (d) <h4>
- 30.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h6>? (a) <h6> (b) <h2> (c) <h5> (d) <h1>
- 31.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <p> (d) <h6>
-
32.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>The red kite</p> --> - 33.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
34.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Papaya</li>
</ol> - 35.True or false: HTML on its own can count button clicks. (a) True (b) False
- 36.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 37.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
- 38.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h2> (d) <h1>
- 39.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
-
40.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Welcome! (b) Thanks for visiting. (c) My Hobbies (d) body
Answer key
- 2
- <h2>
- https://example.com
- <ul>
- an opening tag
- 2
- <body>
- </h2>
- games.html
- has a closing tag
- 6
- starts a new line
- in a new tab
- as one space
- <ul>
- <img>
- <body>
- My pets
- </head>
- Planets
- 4
- Art Gallery
- 3
- <li>
- </u>
- False
- 2
- quiz.html
- <h1>
- <h1>
- <h6>
- 1
- No
- 2
- False
- has a closing tag
- Yes
- <h4>
- opens it in a new tab
- Welcome!
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids