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.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>I love mangoes.</p>
<p>Our school trip</p>
<!-- <p>Fun facts</p> -->
<p>The red kite</p> -
2.🔗 Where does this link open?
<a href="games.html">Take the quiz</a> (a) in the same tab (b) in a new tab - 3.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
4.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Orange</li>
<li>Mango</li>
<li>Jamun</li>
</ul> - 5.📝 What does <br> do? (a) makes a list (b) starts a new line (c) adds a picture (d) makes text bold
-
6.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="100"> (a) fort.jpg (b) width (c) An old fort (d) A tiger asleep - 7.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
- 8.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
9.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Our school trip</p>
<!-- <p>Cricket is fun.</p> --> - 10.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
11.🔍 One closing tag is missing. Which one?
<h2>Good morning!
<small>Cricket is fun.</small>
<b>I love mangoes.</b> (a) </small> (b) </b> (c) </h2> (d) </h3> -
12.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="200"> -
13.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>Good morning!</p> -->
<p>The red kite</p> (a) Good morning! (b) The red kite (c) Rain today - 14.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
-
15.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue<br>Roses are red<br>Birds sing</p> -
16.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> --> (a) Cricket is fun. (b) Our school trip (c) Rain today - 17.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
-
18.🔗 Which words do you click on?
<a href="contact.html">Maths fun</a> (a) contact.html (b) Art corner (c) href (d) Maths fun -
19.🔍 One closing tag is missing. Which one?
<u>Hello, world!</u>
<small>Fun facts</small>
<strong>Our school trip (a) </u> (b) </strong> (c) </small> (d) </b> - 20.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 10 (d) 6
-
21.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) Visit the site (b) Contact us (c) href (d) games.html - 22.🔍 Which is the odd one out? (a) answers page requests (b) stores a website’s files (c) sends pages over the net (d) has an address bar
-
23.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Banana</li>
<li>Grapes</li>
</ul> - 24.True or false: <ul> has a closing tag. (a) True (b) False
- 25.True or false: a code editor shows line numbers. (a) True (b) False
-
26.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="350"> (a) An old fort (b) Our school bus (c) width (d) bus.jpg - 27.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
-
28.🔗 Which words do you click on?
<a href="contact.html">Art corner</a> (a) contact.html (b) School news (c) href (d) Art corner - 29.Which of these goes in the head? (a) <style> (b) <ul> (c) <img> (d) <h1>
-
30.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="150"> (a) map.png (b) Map of India (c) dog.jpg (d) cake.jpg - 31.📄 Can HTML on its own count button clicks? (a) No (b) Yes
-
32.🔗 Which address opens when you click this link?
<a href="contact.html">Maths fun</a> (a) Maths fun (b) https://example.com (c) contact.html (d) maths.html -
33.🔗 Which words do you click on?
<a href="art.html">Maths fun</a> (a) Maths fun (b) art.html (c) href (d) Art corner - 34.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
35.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow<br>Stars shine<br>Roses are red</p> - 36.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
- 37.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 38.🔍 Which is the odd one out? (a) hosts websites online (b) has an address bar (c) turns HTML into a page (d) shows pages from the web
-
39.🔍 Which line is missing its closing tag?
line 1: <b>My best friend</b>
line 2: <u>My pets
line 3: <p>Fun facts</p> (a) line 1 (b) line 2 (c) line 3 - 40.True or false: in <img>, width shows if the image fails. (a) True (b) False
Answer key
- 4
- in the same tab
- Yes
- 4
- starts a new line
- An old fort
- True
- an empty tag
- 1
- an opening tag
- </h2>
- 200
- Good morning!
- <a>
- 4
- Cricket is fun.
- <ol>
- Maths fun
- </strong>
- 1
- Contact us
- has an address bar
- 3
- True
- True
- Our school bus
- src
- Art corner
- <style>
- map.png
- No
- contact.html
- Maths fun
- in the head
- 4
- <
- No
- hosts websites online
- line 2
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids