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 tag is the least important heading? (a) <h6> (b) <h3> (c) <h1> (d) <p>
- 2.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h6> (d) <h1>
- 3.Which of these goes in the body? (a) <title> (b) <style> (c) <meta charset="utf-8"> (d) <img>
- 4.True or false: HTML on its own can keep a high score. (a) False (b) True
- 5.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 6.🔗 What does HyperText mean? (a) text with links (b) text in colour (c) very big text (d) secret text
- 7.True or false: <ol> is an ordered list. (a) False (b) True
-
8.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Good morning!</p>
<p>Fun facts</p> (a) The red kite (b) Fun facts (c) Good morning! - 9.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //
- 10.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 11.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h6> or <h1>? (a) <h1> (b) <h6> (c) <h3> (d) <h5>
-
12.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Our school trip</p> --> -
13.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) width (b) A red kite (c) tiger.jpg (d) A tiger asleep - 14.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
-
15.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Fun facts</p>
<p>Our school trip</p>
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p> -
16.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Banana</li>
<li>Papaya</li>
<li>Orange</li>
<li>Jamun</li>
<li>Grapes</li>
</ul> - 17.🌐 Which one colours code to help us? (a) a web server (b) a web browser (c) a code editor
-
18.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>My best friend</h2>
<h2>My pets</h2> -
19.🔍 Which line is missing its closing tag?
line 1: <i>The red kite
line 2: <h2>Rain today</h2>
line 3: <b>Good morning!</b> (a) line 2 (b) line 1 (c) line 3 - 20.📄 Can HTML on its own make links to pages? (a) Yes (b) No
- 21.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
-
22.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Guava</li>
<li>Papaya</li>
<li>Orange</li>
</ol> - 23.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
- 24.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </head> (c) <body> (d) </html>
-
25.🔗 Where does this link open?
<a href="art.html" target="_blank">School news</a> (a) in a new tab (b) in the same tab - 26.🌐 Which one shows line numbers? (a) a web server (b) a code editor (c) a web browser
-
27.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p>
<!-- <p>Good morning!</p> -->
<p>My pets</p> - 28.True or false: in <img>, width shows if the image fails. (a) False (b) True
- 29.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <img> (d) <pic>
- 30.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <a> (c) <title> (d) <style>
-
31.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Fun facts</h2>
<h2>The red kite</h2> - 32.💬 Does the browser show comments on the page? (a) No (b) Yes
-
33.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>Mars is red.</p>
</body>
</html> (a) Match report (b) Riya’s Recipes (c) index.html (d) Mars is red. - 34.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
-
35.🔗 Which address opens when you click this link?
<a href="contact.html">Take the quiz</a> (a) contact.html (b) Take the quiz (c) maths.html (d) https://example.com -
36.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>Our school trip</h2>
<h2>My pets</h2> - 37.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
- 38.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Machine (c) Mouse (d) Modern
-
39.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red<br>Stars shine<br>Rivers flow<br>Kites fly high</p> -
40.🔍 One closing tag is missing. Which one?
<strong>My pets</strong>
<h3>Cricket is fun.</h3>
<h1>Rain today (a) </h2> (b) </strong> (c) </h3> (d) </h1>
Answer key
- <h6>
- <h1>
- <img>
- False
- Yes
- text with links
- True
- The red kite
- <!--
- No
- <h6>
- 2
- A tiger asleep
- the body
- 4
- 6
- a code editor
- 1
- line 1
- Yes
- opens it in a new tab
- 2
- href
- </html>
- in a new tab
- a code editor
- 2
- False
- <img>
- <a>
- 1
- No
- Riya’s Recipes
- <ul>
- contact.html
- 1
- False
- Markup
- 5
- </h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids