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: <h1> has a closing tag. (a) True (b) False
- 2.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
3.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Papaya</li>
<li>Litchi</li>
<li>Mango</li>
<li>Grapes</li>
</ol> - 4.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 5.True or false: HTML on its own can make links to pages. (a) False (b) True
-
6.📋 What number does the browser show next to “Grapes”?
<ol start="6">
<li>Mango</li>
<li>Banana</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Litchi</li>
<li>Orange</li>
</ol> - 7.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) <h2/> (d) </h2>
- 8.🔍 Which is the odd one out? (a) saves our .html files (b) stores a website’s files (c) is where we type code (d) colours code to help us
-
9.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Litchi</li>
<li>Grapes</li>
<li>Mango</li>
<li>Banana</li>
</ol> - 10.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 11.Which of these is an opening tag? (a) </li> (b) </b> (c) </title> (d) <h1>
- 12.Which of these has a closing tag? (a) <img> (b) <meta> (c) <input> (d) <h1>
- 13.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
-
14.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>My best friend</p>
<h2>My pets</h2>
<p>The red kite</p>
<h2>I love mangoes.</h2> - 15.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
- 16.True or false: in <img>, width sets how tall it is. (a) True (b) False
- 17.True or false: a web browser is where we type code. (a) False (b) True
-
18.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Sky is blue<br>Kites fly high<br>Stars shine</p> -
19.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Our school trip</p> -->
<p>Good morning!</p> (a) The red kite (b) Our school trip (c) Good morning! - 20.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h6> or <h4>? (a) <h5> (b) <h4> (c) <h3> (d) <h6>
-
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="300"> (a) Birthday cake (b) map.png (c) Map of India (d) width -
22.🔍 One closing tag is missing. Which one?
<i>Fun facts</i>
<h2>I love mangoes.</h2>
<h1>My pets (a) </i> (b) </b> (c) </h1> (d) </h2> - 23.Which of these is true of a web browser? (a) stores a website’s files (b) hosts websites online (c) sends pages over the net (d) opens web pages for us
-
24.🔗 Which words do you click on?
<a href="contact.html">About us</a> (a) Contact us (b) href (c) contact.html (d) About us -
25.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="350"> (a) Birthday cake (b) map.png (c) Map of India (d) width - 26.🔍 Which is the odd one out? (a) opens web pages for us (b) colours code to help us (c) is where we type code (d) saves our .html files
- 27.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) height (c) src (d) alt
-
28.🔗 Which address opens when you click this link?
<a href="contact.html">Maths fun</a> (a) maths.html (b) https://example.com (c) Maths fun (d) contact.html -
29.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine<br>Sky is blue<br>Birds sing<br>Roses are red</p> - 30.Which of these has a closing tag? (a) <img> (b) <meta> (c) <ul> (d) <input>
-
31.🔗 Which words do you click on?
<a href="games.html">Visit the site</a> (a) Maths fun (b) href (c) games.html (d) Visit the site - 32.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) element (d) editor
-
33.🔗 Where does this link open?
<a href="maths.html">Maths fun</a> (a) in a new tab (b) in the same tab -
34.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Hello, world!</p>
<!-- <p>Good morning!</p> --> - 35.📝 What does <hr> draw? (a) a table (b) a line across the page (c) a link (d) a picture
- 36.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) href (d) id
- 37.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype
- 38.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h3> or <h4>? (a) <h4> (b) <h3> (c) <h5> (d) <h6>
- 39.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) </h3> (c) <\h3> (d) <h3>
-
40.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="100"> (a) cake.jpg (b) Map of India (c) dog.jpg (d) map.png
Answer key
- True
- an opening tag
- 4
- a closing tag
- True
- 9
- </h2>
- stores a website’s files
- 2
- No
- <h1>
- <h1>
- 1
- 3
- opens it in a new tab
- False
- False
- 4
- Our school trip
- <h6>
- Map of India
- </h1>
- opens web pages for us
- About us
- Map of India
- opens web pages for us
- width
- contact.html
- 5
- <ul>
- Visit the site
- element
- in the same tab
- 2
- a line across the page
- href
- the body
- <h6>
- </h3>
- map.png
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids