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 headings are in this code?
<h1>Fun facts</h1>
<p>My pets</p>
<h3>The red kite</h3>
<h2>My pets</h2>
<h4>My best friend</h4> - 2.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h2>? (a) <h6> (b) <h2> (c) <h3> (d) <h5>
-
3.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>The red kite</p> -->
<p>Fun facts</p>
<p>Rain today</p> (a) Fun facts (b) The red kite (c) Rain today (d) My best friend - 4.True or false: in <img>, height describes the picture. (a) False (b) True
-
5.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Good morning!</p> -->
<p>Our school trip</p>
<p>Rain today</p> (a) Good morning! (b) Rain today (c) Our school trip (d) The red kite -
6.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Fun facts</p>
<p>Cricket is fun.</p>
<p>Cricket is fun.</p>
<p>Our school trip</p> - 7.Which of these is an empty tag? (a) <h1> (b) <ul> (c) <b> (d) <br>
- 8.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 9.True or false: HTML on its own can pick a random number. (a) False (b) True
-
10.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Mango</li>
<li>Orange</li>
</ol> - 11.🖼️ Which attribute of <img> describes the picture? (a) alt (b) height (c) width (d) src
- 12.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
- 13.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h1> or <h6>? (a) <h4> (b) <h6> (c) <h3> (d) <h1>
- 14.📄 Can HTML on its own make links to pages? (a) Yes (b) No
-
15.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) cake.jpg (b) A happy dog (c) Birthday cake (d) width -
16.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Good morning!</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p> - 17.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <br> (d) <p>
- 18.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) src (c) width (d) height
- 19.🏷️ Which is the closing tag for <i>? (a) <i/> (b) <i> (c) </i> (d) <\i>
- 20.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
- 21.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) height (d) alt
- 22.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
23.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="100"> (a) Map of India (b) dog.jpg (c) map.png (d) cake.jpg - 24.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h5> or <h1>? (a) <h4> (b) <h1> (c) <h5> (d) <h2>
-
25.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Fun facts</p>
<!-- <p>My best friend</p> --> (a) Our school trip (b) Fun facts (c) My best friend -
26.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Papaya</li>
<li>Mango</li>
<li>Litchi</li>
<li>Jamun</li>
</ul> -
27.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Hello, world!</p>
<p>Cricket is fun.</p>
<h3>Fun facts</h3> -
28.🔗 Which address opens when you click this link?
<a href="https://example.com">Contact us</a> (a) art.html (b) Contact us (c) https://example.com (d) maths.html - 29.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
-
30.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Good morning!</p>
<p>Hello, world!</p>
<h2>Hello, world!</h2> -
31.🔗 Where does this link open?
<a href="maths.html">Art corner</a> (a) in a new tab (b) in the same tab - 32.Which of these goes in the head? (a) <h1> (b) <img> (c) <link rel="stylesheet"> (d) <ul>
- 33.True or false: <ul> goes in the body. (a) True (b) False
- 34.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to load it faster (d) to describe the image
- 35.💬 How does an HTML comment end? (a) >> (b) // (c) */ (d) -->
-
36.🔗 Where does this link open?
<a href="news.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab -
37.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>Good morning!</p>
<p>Our school trip</p>
<h2>The red kite</h2> -
38.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="150"> (a) The full moon (b) fort.jpg (c) moon.png (d) bus.jpg -
39.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Good morning!</p>
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p> (a) Good morning! (b) I love mangoes. (c) The red kite (d) My pets - 40.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
Answer key
- 4
- <h2>
- The red kite
- False
- Good morning!
- 5
- <br>
- an empty tag
- False
- 5
- alt
- <!DOCTYPE html>
- <h1>
- Yes
- Birthday cake
- 1
- <h1>
- alt
- </i>
- <ol>
- src
- has a closing tag
- map.png
- <h1>
- My best friend
- 5
- 2
- https://example.com
- in the head
- 2
- in the same tab
- <link rel="stylesheet">
- True
- to describe the image
- -->
- in a new tab
- 2
- moon.png
- I love mangoes.
- an opening tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids