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 attribute of <img> is read by screen readers? (a) src (b) alt (c) width (d) height
- 2.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
-
3.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) dog.jpg (b) width (c) A happy dog (d) The full moon - 4.Which of these is an opening tag? (a) </h1> (b) </body> (c) <p> (d) </title>
- 5.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
-
6.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Guava</li>
<li>Papaya</li>
<li>Orange</li>
<li>Grapes</li>
</ul> -
7.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Fun facts</p>
<h2>My pets</h2>
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<h2>I love mangoes.</h2> - 8.True or false: a web server sends pages over the net. (a) True (b) False
- 9.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
- 10.Which of these is an opening tag? (a) </p> (b) <b> (c) </b> (d) </li>
-
11.🔗 Which words do you click on?
<a href="news.html">Art corner</a> (a) Art corner (b) School news (c) href (d) news.html - 12.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
- 13.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
- 14.True or false: in <img>, alt sets how tall it is. (a) False (b) True
- 15.📄 Can HTML on its own run a game loop? (a) Yes (b) No
-
16.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) width (b) tiger.jpg (c) A red kite (d) A tiger asleep -
17.🔍 One closing tag is missing. Which one?
<u>Hello, world!</u>
<h1>Fun facts
<strong>Good morning!</strong> (a) </u> (b) </strong> (c) </p> (d) </h1> - 18.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <h1> (d) <br>
-
19.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) A tiger asleep (b) tiger.jpg (c) kite.png (d) map.png -
20.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Hello, world!</p>
<p>My best friend</p> -
21.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Cricket is fun.</p>
<!-- <p>My pets</p> -->
<p>Fun facts</p> (a) Fun facts (b) My pets (c) Cricket is fun. (d) My best friend - 22.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
- 23.True or false: a web browser is where we type code. (a) False (b) True
- 24.Which of these is an opening tag? (a) </body> (b) </p> (c) <title> (d) </h1>
- 25.🖼️ Which attribute of <img> describes the picture? (a) alt (b) src (c) height (d) width
- 26.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
- 27.Which of these is a closing tag? (a) <title> (b) <body> (c) </b> (d) <p>
- 28.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Mouse (c) Machine (d) Modern
-
29.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Mango</li>
<li>Banana</li>
</ol> (a) bullets (b) numbers - 30.🔤 In “HTML”, what does the L stand for? (a) Language (b) Link (c) Laptop (d) Line
-
31.🔗 Which words do you click on?
<a href="about.html">Contact us</a> (a) href (b) Visit the site (c) about.html (d) Contact us - 32.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
33.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) Welcome! (c) index.html (d) Riya’s Recipes - 34.Which of these goes in the body? (a) <title> (b) <a> (c) <meta charset="utf-8"> (d) <style>
- 35.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) has an address bar (d) shows line numbers
-
36.🔍 Which line is missing its closing tag?
line 1: <small>The red kite</small>
line 2: <h2>Rain today
line 3: <em>My pets</em> (a) line 3 (b) line 1 (c) line 2 -
37.🔗 Which address opens when you click this link?
<a href="https://example.com">Contact us</a> (a) art.html (b) https://example.com (c) maths.html (d) Contact us -
38.🔗 Where does this link open?
<a href="news.html">Maths fun</a> (a) in the same tab (b) in a new tab - 39.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
-
40.🔍 One closing tag is missing. Which one?
<small>Rain today</small>
<h2>My best friend
<em>My pets</em> (a) </em> (b) </h2> (c) </strong> (d) </small>
Answer key
- alt
- <ol>
- A happy dog
- <p>
- a code editor
- 5
- 4
- True
- in the head
- <b>
- Art corner
- <img>
- <h6>
- False
- No
- A tiger asleep
- </h1>
- <h1>
- tiger.jpg
- 3
- My pets
- a slash /
- False
- <title>
- alt
- 6
- </b>
- Markup
- numbers
- Language
- Contact us
- No
- Riya’s Recipes
- <a>
- has an address bar
- line 2
- https://example.com
- in the same tab
- -->
- </h2>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids