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.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Easy snacks (b) My Hobbies (c) We won by 5 runs. (d) index.html - 2.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ol> (c) <ul>
- 3.📝 What does <p> make? (a) a link (b) a paragraph (c) a picture (d) a table
-
4.🔍 Which line is missing its closing tag?
line 1: <small>The red kite
line 2: <h2>My best friend</h2>
line 3: <u>My pets</u> (a) line 1 (b) line 3 (c) line 2 - 5.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h4>? (a) <h1> (b) <h5> (c) <h4> (d) <h2>
-
6.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>My best friend</p>
<h3>My pets</h3>
<p>Our school trip</p> - 7.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
8.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Banana</li>
<li>Papaya</li>
</ol> - 9.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) hosts websites online (d) shows pages from the web
- 10.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
- 11.Which of these is a closing tag? (a) <title> (b) <b> (c) <li> (d) </p>
- 12.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
13.🔗 Which words do you click on?
<a href="maths.html">Play games</a> (a) maths.html (b) About us (c) href (d) Play games - 14.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
- 15.True or false: <ol> goes inside ul or ol. (a) True (b) False
- 16.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
-
17.🔗 Which words do you click on?
<a href="quiz.html">School news</a> (a) quiz.html (b) School news (c) Take the quiz (d) href -
18.🔗 Which address opens when you click this link?
<a href="contact.html">Maths fun</a> (a) maths.html (b) Maths fun (c) contact.html (d) https://example.com - 19.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
-
20.🔍 One closing tag is missing. Which one?
<strong>I love mangoes.</strong>
<h2>Cricket is fun.
<small>The red kite</small> (a) </h2> (b) </small> (c) </strong> (d) </b> - 21.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
-
22.🔍 One closing tag is missing. Which one?
<small>I love mangoes.</small>
<h3>Hello, world!
<h1>My pets</h1> (a) </h1> (b) </small> (c) </h3> (d) </strong> -
23.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Jamun</li>
</ol> - 24.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
25.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="350"> (a) map.png (b) kite.png (c) cake.jpg (d) A red kite -
26.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Guava</li>
</ul> (a) numbers (b) bullets - 27.Which of these goes in the head? (a) <a> (b) <p> (c) <ul> (d) <title>
- 28.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
29.📋 What number does the browser show next to “Banana”?
<ol start="9">
<li>Grapes</li>
<li>Orange</li>
<li>Guava</li>
<li>Banana</li>
</ol> -
30.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Jamun</li>
</ol> (a) bullets (b) numbers -
31.🔗 Which address opens when you click this link?
<a href="art.html">Art corner</a> (a) news.html (b) quiz.html (c) art.html (d) Art corner - 32.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 33.Which of these is an empty tag? (a) <li> (b) <b> (c) <ul> (d) <br>
- 34.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 35.True or false: <li> lists things in any order. (a) False (b) True
- 36.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /
- 37.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as a new line (d) as one space
-
38.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Hello, world!</p>
<p>My best friend</p>
<!-- <p>Our school trip</p> --> (a) Good morning! (b) Hello, world! (c) My best friend (d) Our school trip - 39.Which of these is true of a web browser? (a) is where we type code (b) sends pages over the net (c) shows pages from the web (d) hosts websites online
- 40.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h5> or <h2>? (a) <h2> (b) <h1> (c) <h5> (d) <h4>
Answer key
- My Hobbies
- <li>
- a paragraph
- line 1
- <h1>
- 2
- Yes
- 3
- shows pages from the web
- opens it in a new tab
- </p>
- No
- Play games
- in the body
- False
- on the browser tab
- School news
- contact.html
- in the head
- </h2>
- <ol>
- </h3>
- 2
- has a closing tag
- kite.png
- bullets
- <title>
- an opening tag
- 12
- numbers
- art.html
- in the head
- <br>
- in the head
- False
- a slash /
- as one space
- Our school trip
- shows pages from the web
- <h5>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids