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.🔗 Where does this link open?
<a href="contact.html" target="_blank">Take the quiz</a> (a) in the same tab (b) in a new tab - 2.🏷️ Which is the closing tag for <small>? (a) <small> (b) <\small> (c) <small/> (d) </small>
-
3.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Mango</li>
</ol> - 4.💬 How does an HTML comment end? (a) >> (b) */ (c) // (d) -->
- 5.📄 Can HTML on its own make tables? (a) No (b) Yes
-
6.🔍 Which line is missing its closing tag?
line 1: <h2>Hello, world!
line 2: <strong>Cricket is fun.</strong>
line 3: <h3>The red kite</h3> (a) line 1 (b) line 2 (c) line 3 - 7.🌍 Which program shows a web page to us? (a) a paint program (b) a web browser (c) a music player (d) a calculator
- 8.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <br> (d) <p>
-
9.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Contact us</a> (a) in the same tab (b) in a new tab - 10.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 11.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
- 12.Which of these has a closing tag? (a) <img> (b) <input> (c) <br> (d) <b>
-
13.🔍 One closing tag is missing. Which one?
<p>Hello, world!</p>
<h1>Our school trip
<h3>I love mangoes.</h3> (a) </h3> (b) </p> (c) </h1> (d) </b> -
14.🔗 Which address opens when you click this link?
<a href="contact.html">Maths fun</a> (a) contact.html (b) maths.html (c) https://example.com (d) Maths fun -
15.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Grapes</li>
<li>Papaya</li>
</ul> - 16.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h6> or <h1>? (a) <h6> (b) <h2> (c) <h5> (d) <h1>
- 17.True or false: in <img>, src is read by screen readers. (a) False (b) True
-
18.🔍 One closing tag is missing. Which one?
<b>Hello, world!</b>
<strong>The red kite</strong>
<h1>Fun facts (a) </strong> (b) </h1> (c) </b> (d) </h3> - 19.True or false: <ol> lists steps in order. (a) True (b) False
-
20.🔗 Which words do you click on?
<a href="games.html">School news</a> (a) href (b) games.html (c) Take the quiz (d) School news - 21.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
-
22.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>My drawings</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) index.html (c) My drawings (d) Riya’s Recipes - 23.True or false: <hr> has a closing tag. (a) True (b) False
- 24.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 25.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
-
26.🔍 One closing tag is missing. Which one?
<em>Cricket is fun.</em>
<b>The red kite
<strong>My best friend</strong> (a) </p> (b) </em> (c) </strong> (d) </b> -
27.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>My pets</h2>
<p>Rain today</p> -
28.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>My drawings</h1>
<p>I like to read.</p>
</body>
</html> (a) Art Gallery (b) I like to read. (c) My drawings (d) body -
29.🔗 Where does this link open?
<a href="about.html">School news</a> (a) in the same tab (b) in a new tab - 30.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) src (c) height (d) alt
- 31.🧱 HTML gives a web page its ___. (a) colours (b) speed (c) structure (d) sound
- 32.🌐 Which one shows line numbers? (a) a web browser (b) a web server (c) a code editor
- 33.True or false: in <img>, height tells which image to load. (a) True (b) False
-
34.🔍 Which line is missing its closing tag?
line 1: <b>I love mangoes.</b>
line 2: <small>The red kite</small>
line 3: <h2>Good morning! (a) line 2 (b) line 3 (c) line 1 - 35.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h2> or <h5>? (a) <h5> (b) <h6> (c) <h1> (d) <h2>
- 36.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 37.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 38.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as one space (c) as a dot (d) as a new line
- 39.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
- 40.💬 Does the browser show comments on the page? (a) No (b) Yes
Answer key
- in a new tab
- </small>
- 2
- -->
- Yes
- line 1
- a web browser
- <h1>
- in a new tab
- an opening tag
- True
- <b>
- </h1>
- contact.html
- 3
- <h6>
- False
- </h1>
- True
- School news
- href
- Riya’s Recipes
- False
- an opening tag
- 6
- </b>
- 2
- My drawings
- in the same tab
- height
- structure
- a code editor
- False
- line 3
- <h6>
- has a closing tag
- No
- as one space
- the body
- No
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids