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.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 2.True or false: <li> is an empty tag. (a) True (b) False
-
3.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="100"> (a) Map of India (b) Birthday cake (c) width (d) map.png -
4.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>The red kite</p>
<!-- <p>Hello, world!</p> --> (a) The red kite (b) Hello, world! (c) Rain today - 5.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) </h3> (c) <\h3> (d) <h3/>
- 6.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
- 7.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) height (c) width (d) src
-
8.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Our school trip</p>
<h4>My best friend</h4>
<p>The red kite</p>
<p>I love mangoes.</p> - 9.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
-
10.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Orange</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Papaya</li>
</ol> -
11.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>Hello, world!</h2>
<p>Fun facts</p>
<p>I love mangoes.</p> - 12.True or false: in <img>, src sets how tall it is. (a) True (b) False
-
13.🔍 Which line is missing its closing tag?
line 1: <strong>Cricket is fun.
line 2: <small>Fun facts</small>
line 3: <u>I love mangoes.</u> (a) line 1 (b) line 3 (c) line 2 -
14.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="300"> - 15.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a dollar $ (d) a hash #
- 16.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
17.🔍 One closing tag is missing. Which one?
<strong>Our school trip</strong>
<i>Fun facts
<b>My best friend</b> (a) </b> (b) </i> (c) </h1> (d) </strong> -
18.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="200"> (a) map.png (b) cake.jpg (c) A red kite (d) kite.png - 19.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 3 (d) 10
-
20.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="400"> -
21.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue</p> - 22.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h3>? (a) <h1> (b) <h3> (c) <h4> (d) <h2>
-
23.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h4>Hello, world!</h4>
<h3>Hello, world!</h3>
<p>My pets</p>
<p>Fun facts</p> - 24.True or false: in <img>, src sets how wide it is. (a) False (b) True
- 25.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
-
26.📋 What number does the browser show next to “Jamun”?
<ol start="9">
<li>Banana</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Papaya</li>
<li>Guava</li>
</ol> -
27.🔗 Which address opens when you click this link?
<a href="contact.html">School news</a> (a) School news (b) contact.html (c) maths.html (d) https://example.com -
28.🔗 Which address opens when you click this link?
<a href="art.html">Take the quiz</a> (a) quiz.html (b) news.html (c) art.html (d) Take the quiz -
29.🔗 Which address opens when you click this link?
<a href="games.html">Visit the site</a> (a) Visit the site (b) contact.html (c) games.html (d) about.html - 30.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) height (d) src
- 31.Which of these goes in the head? (a) <h1> (b) <a> (c) <ul> (d) <meta charset="utf-8">
- 32.🏷️ Which is the closing tag for <u>? (a) <u/> (b) <\u> (c) <u> (d) </u>
- 33.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
34.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="150"> - 35.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h3>? (a) <h6> (b) <h5> (c) <h3> (d) <h2>
-
36.🔍 Which line is missing its closing tag?
line 1: <h2>Our school trip</h2>
line 2: <b>Cricket is fun.
line 3: <u>I love mangoes.</u> (a) line 2 (b) line 3 (c) line 1 - 37.True or false: <li> goes inside ul or ol. (a) True (b) False
-
38.🔍 One closing tag is missing. Which one?
<h3>My best friend
<strong>I love mangoes.</strong>
<i>The red kite</i> (a) </h2> (b) </h3> (c) </strong> (d) </i> - 39.Which of these is an opening tag? (a) </p> (b) <body> (c) </li> (d) </title>
-
40.🔍 One closing tag is missing. Which one?
<i>My pets</i>
<small>My best friend</small>
<h2>Fun facts (a) </small> (b) </h2> (c) </h3> (d) </i>
Answer key
- has a closing tag
- False
- Map of India
- Hello, world!
- </h3>
- a web browser
- width
- 2
- on the browser tab
- 5
- 3
- False
- line 1
- 300
- a slash /
- a closing tag
- </i>
- kite.png
- 6
- 400
- 2
- <h4>
- 3
- False
- <!DOCTYPE html>
- 10
- contact.html
- art.html
- games.html
- height
- <meta charset="utf-8">
- </u>
- in the head
- 150
- <h6>
- line 2
- True
- </h3>
- <body>
- </h2>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids