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: in <img>, height is read by screen readers. (a) False (b) True
- 2.True or false: <input> has a closing tag. (a) False (b) True
-
3.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Roses are red<br>Rivers flow<br>Stars shine</p> - 4.📄 Can HTML on its own make a form? (a) Yes (b) No
- 5.True or false: a code editor opens web pages for us. (a) False (b) True
- 6.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) alt (d) height
-
7.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Grapes</li>
</ul> (a) numbers (b) bullets - 8.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to load it faster (d) to colour it
-
9.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Stars shine<br>Roses are red</p> - 10.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) href (d) id
-
11.📋 What number does the browser show next to “Banana”?
<ol start="2">
<li>Litchi</li>
<li>Orange</li>
<li>Jamun</li>
<li>Banana</li>
<li>Guava</li>
</ol> -
12.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="100"> (a) A tiger asleep (b) width (c) fort.jpg (d) An old fort -
13.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Guava</li>
<li>Orange</li>
</ul> (a) bullets (b) numbers -
14.🔗 Which address opens when you click this link?
<a href="quiz.html">Visit the site</a> (a) about.html (b) Visit the site (c) games.html (d) quiz.html - 15.Which of these goes in the head? (a) <h1> (b) <link rel="stylesheet"> (c) <ul> (d) <img>
-
16.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>My best friend</p> -->
<p>My pets</p>
<!-- <p>Rain today</p> --> - 17.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
-
18.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>Good morning!</p> -->
<p>My best friend</p> -
19.🔍 Which line is missing its closing tag?
line 1: <b>Cricket is fun.</b>
line 2: <h2>The red kite</h2>
line 3: <h1>My best friend (a) line 2 (b) line 1 (c) line 3 - 20.📋 Which list tag is an ordered list? (a) <ol> (b) <li> (c) <ul>
- 21.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 22.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
- 23.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
-
24.🔗 Which address opens when you click this link?
<a href="https://example.com">About us</a> (a) maths.html (b) https://example.com (c) art.html (d) About us - 25.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
-
26.🔗 Which words do you click on?
<a href="contact.html">About us</a> (a) href (b) contact.html (c) Contact us (d) About us - 27.True or false: <li> is an ordered list. (a) False (b) True
-
28.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="250"> (a) bus.jpg (b) moon.png (c) The full moon (d) fort.jpg -
29.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>My pets</p> -->
<p>I love mangoes.</p> -
30.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Orange</li>
<li>Mango</li>
</ol> - 31.🔢 In a basic web page file, which comes first: “</html>” or “<html>”? (a) </html> (b) <html>
-
32.📋 What number does the browser show next to “Litchi”?
<ol start="6">
<li>Grapes</li>
<li>Banana</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Guava</li>
<li>Papaya</li>
</ol> -
33.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="150"> (a) Birthday cake (b) cake.jpg (c) dog.jpg (d) moon.png -
34.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Banana</li>
<li>Guava</li>
<li>Papaya</li>
</ol> - 35.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as 5 spaces (c) as a new line (d) as a dot
-
36.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="200"> (a) cake.jpg (b) dog.jpg (c) Map of India (d) map.png - 37.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
38.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>My best friend</p>
<p>Good morning!</p> - 39.True or false: a web browser shows pages from the web. (a) True (b) False
- 40.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <style> (d) <h1>
Answer key
- False
- False
- 4
- Yes
- False
- alt
- bullets
- to describe the image
- 3
- href
- 5
- An old fort
- bullets
- quiz.html
- <link rel="stylesheet">
- 1
- a web browser
- 2
- line 3
- <ol>
- an empty tag
- <ol>
- in the head
- https://example.com
- <
- About us
- False
- moon.png
- 1
- 5
- <html>
- 8
- cake.jpg
- 3
- as one space
- map.png
- Yes
- 2
- True
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids