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.True or false: in <img>, alt describes the picture. (a) True (b) False
- 2.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h3> or <h5>? (a) <h2> (b) <h5> (c) <h3> (d) <h6>
- 3.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 4.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h3> (d) <h6>
-
5.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> -->
<p>Our school trip</p> (a) Our school trip (b) I love mangoes. (c) Hello, world! (d) My pets - 6.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <ol> (d) <br>
- 7.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
8.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) width (b) A tiger asleep (c) A red kite (d) tiger.jpg - 9.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
-
10.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Banana</li>
</ul> (a) numbers (b) bullets -
11.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>My pets</h2>
<p>The red kite</p> - 12.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
- 13.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
-
14.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<p>Good morning!</p> (a) Rain today (b) Good morning! (c) Hello, world! - 15.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h5> or <h4>? (a) <h5> (b) <h2> (c) <h3> (d) <h4>
-
16.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Orange</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Litchi</li>
</ol> - 17.🔢 In a basic web page file, which comes first: “<head>” or “</html>”? (a) <head> (b) </html>
-
18.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) index.html (b) Space Facts (c) Welcome! (d) We won by 5 runs. - 19.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Modern (c) Machine (d) Markup
- 20.Which of these is an empty tag? (a) <p> (b) <li> (c) <br> (d) <ul>
- 21.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 22.True or false: <style> goes in the body. (a) True (b) False
- 23.True or false: <img> goes in the body. (a) True (b) False
- 24.📄 Where does the text of <title> appear? (a) at the bottom (b) on the browser tab (c) in a big heading (d) nowhere
- 25.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 26.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
- 27.Which of these is an opening tag? (a) <p> (b) </b> (c) </title> (d) </h1>
- 28.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 29.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) width (c) height (d) alt
-
30.🔍 Which line is missing its closing tag?
line 1: <h3>Cricket is fun.</h3>
line 2: <p>Good morning!</p>
line 3: <b>Rain today (a) line 1 (b) line 2 (c) line 3 - 31.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 32.True or false: a code editor is where we type code. (a) True (b) False
-
33.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Rain today</p>
<p>My pets</p>
<p>I love mangoes.</p> -
34.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Hello, world!</p>
<h4>My pets</h4> - 35.True or false: in <img>, height sets how tall it is. (a) True (b) False
- 36.Which of these is an opening tag? (a) </p> (b) </title> (c) <h1> (d) </b>
- 37.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h6>? (a) <h4> (b) <h3> (c) <h6> (d) <h2>
- 38.🔗 What does HyperText mean? (a) text in colour (b) very big text (c) text with links (d) secret text
- 39.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <p> (c) <br> (d) <h6>
-
40.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Mango</li>
<li>Jamun</li>
<li>Banana</li>
<li>Grapes</li>
</ol>
Answer key
- True
- <h2>
- an opening tag
- <h6>
- Hello, world!
- <ul>
- an empty tag
- A tiger asleep
- opens it in a new tab
- bullets
- 2
- <li>
- False
- Hello, world!
- <h2>
- 2
- <head>
- Space Facts
- Markup
- <br>
- True
- False
- True
- on the browser tab
- Yes
- 1
- <p>
- No
- width
- line 3
- Yes
- True
- 3
- 2
- True
- <h1>
- <h2>
- text with links
- <h1>
- 5
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids