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 one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
- 2.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 3.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) height (c) src (d) alt
- 4.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) </h1> (d) <h1/>
-
5.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Banana</li>
</ol> -
6.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Stars shine<br>Roses are red</p> -
7.🔗 Which address opens when you click this link?
<a href="quiz.html">About us</a> (a) quiz.html (b) games.html (c) about.html (d) About us -
8.🔍 One closing tag is missing. Which one?
<em>My best friend
<u>The red kite</u>
<h2>I love mangoes.</h2> (a) </u> (b) </em> (c) </small> (d) </h2> -
9.🔗 Which words do you click on?
<a href="news.html">School news</a> (a) School news (b) Take the quiz (c) href (d) news.html -
10.🔗 Which address opens when you click this link?
<a href="contact.html">Visit the site</a> (a) https://example.com (b) Visit the site (c) contact.html (d) maths.html - 11.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) src (c) width (d) alt
- 12.True or false: <li> is an empty tag. (a) False (b) True
-
13.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Visit the site</a> (a) in the same tab (b) in a new tab - 14.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to describe the image (d) to make it bigger
- 15.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h4> or <h6>? (a) <h3> (b) <h6> (c) <h1> (d) <h4>
- 16.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) address (d) attribute
-
17.🔍 One closing tag is missing. Which one?
<b>My best friend
<h2>Cricket is fun.</h2>
<strong>Hello, world!</strong> (a) </h2> (b) </strong> (c) </b> (d) </i> - 18.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
- 19.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
-
20.🔍 One closing tag is missing. Which one?
<em>I love mangoes.</em>
<i>The red kite
<p>Good morning!</p> (a) </h2> (b) </em> (c) </i> (d) </p> - 21.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h5> or <h4>? (a) <h2> (b) <h1> (c) <h5> (d) <h4>
- 22.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
-
23.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>My pets</h2>
<h2>Fun facts</h2>
<p>My pets</p>
<h2>My pets</h2>
<p>Rain today</p> -
24.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Guava</li>
</ol> (a) bullets (b) numbers - 25.True or false: <h1> is an empty tag. (a) True (b) False
- 26.True or false: <style> goes in the head. (a) True (b) False
-
27.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Fun facts</p>
<p>I love mangoes.</p>
<p>Hello, world!</p> -
28.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) dog.jpg (b) width (c) The full moon (d) A happy dog -
29.🔠 How many headings are in this code?
<h1>My pets</h1>
<h3>My pets</h3>
<p>Cricket is fun.</p> -
30.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> -->
<p>Rain today</p> (a) I love mangoes. (b) Good morning! (c) Rain today - 31.Which of these has a closing tag? (a) <img> (b) <hr> (c) <br> (d) <ul>
- 32.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <a> (d) <img>
-
33.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Mango</li>
<li>Papaya</li>
<li>Grapes</li>
</ul> - 34.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a picture (d) a table
- 35.True or false: HTML on its own cannot pick a random number. (a) False (b) True
-
36.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Fun facts</p>
<p>Our school trip</p> (a) I love mangoes. (b) Fun facts (c) Our school trip -
37.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) A tiger asleep (b) map.png (c) tiger.jpg (d) kite.png -
38.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="250"> (a) fort.jpg (b) bus.jpg (c) The full moon (d) moon.png - 39.📄 Can HTML on its own make a form? (a) No (b) Yes
- 40.Which of these is a closing tag? (a) <h1> (b) <title> (c) </b> (d) <body>
Answer key
- a web browser
- has a closing tag
- width
- </h1>
- 4
- 3
- quiz.html
- </em>
- School news
- contact.html
- height
- False
- in a new tab
- to describe the image
- <h6>
- element
- </b>
- <h1>
- <ol>
- </i>
- <h1>
- <a href="about.html">
- 3
- numbers
- False
- True
- 3
- A happy dog
- 2
- Good morning!
- <ul>
- <img>
- 4
- a line across the page
- True
- I love mangoes.
- tiger.jpg
- moon.png
- Yes
- </b>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids