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: <meta> is an empty tag. (a) True (b) False
- 2.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <\h2> (c) </h2> (d) <h2/>
-
3.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Mango</li>
</ul> (a) numbers (b) bullets - 4.True or false: HTML on its own can make tables. (a) True (b) False
- 5.True or false: HTML on its own cannot make tables. (a) False (b) True
- 6.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
- 7.True or false: in <img>, src sets how wide it is. (a) False (b) True
-
8.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers - 9.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
- 10.True or false: in <img>, height is read by screen readers. (a) True (b) False
- 11.True or false: <ul> is an empty tag. (a) True (b) False
- 12.Which of these is true of a web browser? (a) shows line numbers (b) opens web pages for us (c) is where we type code (d) colours code to help us
-
13.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="250"> -
14.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>My best friend</p>
<p>Fun facts</p>
<h3>My best friend</h3>
<p>Good morning!</p> - 15.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h1> or <h6>? (a) <h6> (b) <h3> (c) <h1> (d) <h5>
-
16.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>I love mangoes.</h2>
<p>Rain today</p>
<p>I love mangoes.</p>
<h2>Our school trip</h2> - 17.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Link (d) Language
-
18.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Banana</li>
</ol> - 19.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <head> (c) <!DOCTYPE html> (d) <html>
- 20.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
-
21.📋 What number does the browser show next to “Jamun”?
<ol start="2">
<li>Papaya</li>
<li>Mango</li>
<li>Jamun</li>
<li>Guava</li>
<li>Grapes</li>
</ol> - 22.True or false: in <img>, height shows if the image fails. (a) True (b) False
-
23.🔗 Which address opens when you click this link?
<a href="art.html">Take the quiz</a> (a) news.html (b) Take the quiz (c) art.html (d) quiz.html - 24.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
-
25.🔗 Which address opens when you click this link?
<a href="contact.html">About us</a> (a) maths.html (b) About us (c) contact.html (d) https://example.com - 26.📝 What do we need to write HTML? (a) a printer (b) a microphone (c) a plain text editor (d) a paintbrush
- 27.True or false: <title> is an empty tag. (a) False (b) True
-
28.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>Rain today</p> -->
<!-- <p>My best friend</p> -->
<p>Fun facts</p>
<p>Hello, world!</p> - 29.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 30.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
31.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) A happy dog (b) bus.jpg (c) moon.png (d) dog.jpg - 32.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) width (d) alt
- 33.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) width (d) src
- 34.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 35.True or false: <ul> is one item of a list. (a) True (b) False
- 36.True or false: <meta> has a closing tag. (a) True (b) False
- 37.🔍 Which is the odd one out? (a) colours code to help us (b) hosts websites online (c) sends pages over the net (d) stores a website’s files
-
38.🔍 Which line is missing its closing tag?
line 1: <p>Cricket is fun.
line 2: <small>The red kite</small>
line 3: <i>My best friend</i> (a) line 3 (b) line 2 (c) line 1 - 39.Which of these is true of a code editor? (a) stores a website’s files (b) opens web pages for us (c) is where we type code (d) answers page requests
-
40.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>The red kite</p>
<h3>Our school trip</h3>
<h2>Hello, world!</h2>
Answer key
- True
- </h2>
- bullets
- True
- False
- in the body
- False
- bullets
- a slash /
- False
- False
- opens web pages for us
- 250
- 2
- <h6>
- 3
- Language
- 2
- <!DOCTYPE html>
- a web server
- 4
- False
- art.html
- a code editor
- contact.html
- a plain text editor
- False
- 2
- an empty tag
- a closing tag
- dog.jpg
- alt
- src
- has a closing tag
- False
- False
- colours code to help us
- line 1
- is where we type code
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids