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.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) width (c) src (d) height
-
2.🔍 One closing tag is missing. Which one?
<em>Rain today</em>
<h1>Fun facts</h1>
<h3>My best friend (a) </h1> (b) </i> (c) </h3> (d) </em> - 3.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h3>? (a) <h5> (b) <h4> (c) <h1> (d) <h3>
- 4.True or false: <link rel="stylesheet"> goes in the head. (a) True (b) False
- 5.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
- 6.Which of these has a closing tag? (a) <input> (b) <img> (c) <li> (d) <hr>
- 7.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
-
8.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="100"> (a) cake.jpg (b) dog.jpg (c) Map of India (d) map.png - 9.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 10.Which of these goes in the head? (a) <p> (b) <a> (c) <table> (d) <title>
-
11.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="250"> (a) Birthday cake (b) dog.jpg (c) moon.png (d) cake.jpg -
12.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h3>Cricket is fun.</h3>
<h2>My best friend</h2>
<p>My best friend</p>
<p>I love mangoes.</p> -
13.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>My pets</p>
<!-- <p>My best friend</p> --> (a) My best friend (b) Good morning! (c) My pets - 14.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Machine (c) Mouse (d) Markup
-
15.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Fun facts</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>Rain today</p> -->
<p>Good morning!</p> - 16.True or false: a web server has an address bar. (a) True (b) False
- 17.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
- 18.Which of these is an opening tag? (a) <body> (b) </li> (c) </p> (d) </b>
- 19.Which of these is an empty tag? (a) <input> (b) <p> (c) <ul> (d) <b>
- 20.True or false: HTML on its own cannot make a form. (a) True (b) False
- 21.Which of these is true of a web browser? (a) has an address bar (b) stores a website’s files (c) answers page requests (d) is where we type code
- 22.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
- 23.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
-
24.🔗 Where does this link open?
<a href="maths.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab - 25.📝 What does <hr> draw? (a) a line across the page (b) a picture (c) a link (d) a table
- 26.📄 Can HTML on its own pick a random number? (a) Yes (b) No
-
27.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>My pets</p>
<p>Our school trip</p> - 28.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 29.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
- 30.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h1> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h4>
- 31.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h6>? (a) <h6> (b) <h5> (c) <h4> (d) <h1>
-
32.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Banana</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Guava</li>
<li>Litchi</li>
</ol> -
33.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Kites fly high<br>Stars shine<br>Roses are red<br>Birds sing</p> -
34.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Orange</li>
<li>Banana</li>
</ol> - 35.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h5> or <h3>? (a) <h3> (b) <h4> (c) <h5> (d) <h1>
-
36.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) tiger.jpg (b) width (c) A red kite (d) A tiger asleep - 37.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <h3> (c) </h3> (d) <\h3>
-
38.🔍 Which line is missing its closing tag?
line 1: <i>Rain today</i>
line 2: <b>Fun facts</b>
line 3: <h2>Good morning! (a) line 3 (b) line 2 (c) line 1 - 39.📄 Can HTML on its own make a form? (a) Yes (b) No
- 40.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
Answer key
- alt
- </h3>
- <h1>
- True
- <ul>
- <li>
- -->
- map.png
- in the head
- <title>
- cake.jpg
- 3
- My best friend
- Markup
- 2
- False
- 1
- <body>
- <input>
- False
- has an address bar
- opens it in a new tab
- in the body
- in a new tab
- a line across the page
- No
- 1
- Yes
- <
- <h1>
- <h1>
- 2
- 5
- 3
- <h1>
- A tiger asleep
- </h3>
- line 3
- Yes
- an opening tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids