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.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Cricket is fun.</p>
<p>Rain today</p>
<p>Fun facts</p> - 2.Which of these is an empty tag? (a) <li> (b) <hr> (c) <h1> (d) <p>
- 3.📄 Can HTML on its own run a game loop? (a) Yes (b) No
- 4.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
5.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Hello, world!</p> --> -
6.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Planets</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) body (b) We won by 5 runs. (c) Class 7 Blog (d) Planets - 7.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
8.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Banana</li>
</ul> (a) bullets (b) numbers -
9.🔗 Where does this link open?
<a href="maths.html" target="_blank">Maths fun</a> (a) in a new tab (b) in the same tab -
10.🔍 One closing tag is missing. Which one?
<em>Good morning!
<p>My pets</p>
<h3>Hello, world!</h3> (a) </h3> (b) </h2> (c) </p> (d) </em> -
11.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<!-- <p>The red kite</p> -->
<p>My pets</p> (a) Fun facts (b) My pets (c) The red kite - 12.True or false: in <img>, src tells which image to load. (a) False (b) True
- 13.Which of these goes in the head? (a) <p> (b) <ul> (c) <a> (d) <link rel="stylesheet">
-
14.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) https://example.com (b) About us (c) href (d) Play games - 15.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
- 16.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) src (c) height (d) alt
-
17.🔗 Which address opens when you click this link?
<a href="maths.html">Art corner</a> (a) Art corner (b) news.html (c) maths.html (d) art.html - 18.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <ul> (d) <p>
- 19.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
-
20.🔍 One closing tag is missing. Which one?
<i>I love mangoes.
<em>Hello, world!</em>
<p>Rain today</p> (a) </p> (b) </u> (c) </i> (d) </em> -
21.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Rain today</p> -->
<p>My best friend</p> (a) Rain today (b) I love mangoes. (c) My best friend -
22.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>Fun facts</p>
<!-- <p>Rain today</p> --> - 23.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 24.True or false: <ul> goes in the body. (a) True (b) False
-
25.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Banana</li>
<li>Guava</li>
<li>Papaya</li>
</ol> -
26.🔍 One closing tag is missing. Which one?
<h2>I love mangoes.</h2>
<p>My pets
<h3>Good morning!</h3> (a) </h2> (b) </p> (c) </h3> (d) </b> - 27.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small/> (d) <small>
- 28.True or false: in <img>, height sets how wide it is. (a) True (b) False
- 29.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) High Tech (c) Hot Tags (d) HyperText
-
30.🔗 Where does this link open?
<a href="maths.html" target="_blank">Art corner</a> (a) in a new tab (b) in the same tab - 31.📄 Can HTML on its own make headings? (a) No (b) Yes
- 32.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to load it faster (d) to make it bigger
-
33.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="150"> - 34.Which of these is an opening tag? (a) <body> (b) </p> (c) </title> (d) </li>
-
35.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="350"> - 36.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h3> or <h2>? (a) <h1> (b) <h3> (c) <h6> (d) <h2>
-
37.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Litchi</li>
<li>Papaya</li>
</ul> (a) numbers (b) bullets - 38.True or false: HTML on its own can pick a random number. (a) True (b) False
- 39.True or false: <title> has a closing tag. (a) True (b) False
-
40.🔗 Which words do you click on?
<a href="https://example.com">Take the quiz</a> (a) href (b) Play games (c) https://example.com (d) Take the quiz
Answer key
- 1
- <hr>
- No
- has a closing tag
- 1
- Planets
- Yes
- bullets
- in a new tab
- </em>
- The red kite
- True
- <link rel="stylesheet">
- Play games
- False
- alt
- maths.html
- <li>
- <ul>
- </i>
- Rain today
- 4
- in the head
- True
- 3
- </p>
- </small>
- False
- HyperText
- in a new tab
- Yes
- to describe the image
- 150
- <body>
- 350
- <h1>
- bullets
- False
- True
- Take the quiz
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids