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.🔤 In “HTML”, what does the L stand for? (a) Line (b) Link (c) Laptop (d) Language
- 2.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 3.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) < (d) [
-
4.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="300"> - 5.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
-
6.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Fun facts</p> -->
<p>My pets</p> (a) Hello, world! (b) Fun facts (c) My pets -
7.🔍 One closing tag is missing. Which one?
<h3>My pets</h3>
<h2>Fun facts
<strong>My best friend</strong> (a) </strong> (b) </small> (c) </h2> (d) </h3> - 8.True or false: <ul> is an unordered list. (a) False (b) True
- 9.True or false: a web server saves our .html files. (a) False (b) True
-
10.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="400"> (a) map.png (b) Map of India (c) width (d) Birthday cake - 11.Which of these is an opening tag? (a) <h1> (b) </b> (c) </li> (d) </title>
- 12.True or false: <li> is an empty tag. (a) False (b) True
- 13.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <p> (c) <style> (d) <link rel="stylesheet">
- 14.True or false: <li> is one item of a list. (a) False (b) True
-
15.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Good morning!</p> -->
<p>Fun facts</p>
<p>The red kite</p> (a) Our school trip (b) Fun facts (c) Good morning! (d) The red kite - 16.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 10 (d) 4
-
17.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Birds sing<br>Sky is blue<br>Roses are red<br>Stars shine</p> -
18.🔗 Where does this link open?
<a href="art.html">Play games</a> (a) in a new tab (b) in the same tab -
19.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="350"> -
20.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red<br>Birds sing<br>Kites fly high</p> - 21.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) width (c) alt (d) src
- 22.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) colours code to help us (d) opens web pages for us
-
23.📋 What number does the browser show next to “Banana”?
<ol>
<li>Jamun</li>
<li>Guava</li>
<li>Banana</li>
<li>Mango</li>
<li>Papaya</li>
<li>Litchi</li>
</ol> -
24.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="50"> (a) Birthday cake (b) map.png (c) width (d) Map of India -
25.🔗 Which address opens when you click this link?
<a href="games.html">Visit the site</a> (a) Visit the site (b) about.html (c) contact.html (d) games.html - 26.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h2> or <h5>? (a) <h4> (b) <h5> (c) <h2> (d) <h6>
- 27.Which of these is true of a web server? (a) has an address bar (b) sends pages over the net (c) saves our .html files (d) turns HTML into a page
-
28.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Grapes</li>
<li>Mango</li>
</ul> - 29.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 30.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) alt (c) src (d) height
- 31.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) Hot Tags (c) Home Text (d) HyperText
- 32.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h6> or <h1>? (a) <h5> (b) <h1> (c) <h6> (d) <h4>
- 33.🔗 Which attribute holds the address of a link? (a) href (b) id (c) alt (d) src
-
34.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Stars shine</p> - 35.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 36.Which of these is an opening tag? (a) </h1> (b) </b> (c) <p> (d) </li>
- 37.True or false: <ol> lists steps in order. (a) True (b) False
-
38.🔗 Which words do you click on?
<a href="art.html">Play games</a> (a) art.html (b) About us (c) Play games (d) href - 39.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) sends pages over the net (d) turns HTML into a page
-
40.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p>
<!-- <p>My best friend</p> -->
<!-- <p>Fun facts</p> -->
<!-- <p>Cricket is fun.</p> -->
Answer key
- Language
- a closing tag
- <
- 300
- a slash /
- Fun facts
- </h2>
- True
- False
- Map of India
- <h1>
- False
- <p>
- True
- Good morning!
- 6
- 5
- in the same tab
- 350
- 4
- height
- opens web pages for us
- 3
- Map of India
- games.html
- <h6>
- sends pages over the net
- 3
- a closing tag
- alt
- HyperText
- <h6>
- href
- 2
- an opening tag
- <p>
- True
- Play games
- sends pages over the net
- 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids