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 items does this list show?
<ol>
<li>Orange</li>
<li>Guava</li>
<li>Grapes</li>
</ol> - 2.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) alt (d) src
- 3.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h1> or <h4>? (a) <h1> (b) <h3> (c) <h5> (d) <h4>
-
4.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Good morning!</p>
<p>Hello, world!</p>
<p>Fun facts</p> (a) Fun facts (b) My pets (c) Good morning! (d) Hello, world! - 5.🏷️ Which is the closing tag for <b>? (a) <b/> (b) <\b> (c) </b> (d) <b>
- 6.🔗 Which attribute holds the address of a link? (a) href (b) id (c) alt (d) src
- 7.Which of these is true of a web browser? (a) colours code to help us (b) shows line numbers (c) stores a website’s files (d) shows pages from the web
- 8.Which of these goes in the body? (a) <h1> (b) <title> (c) <meta charset="utf-8"> (d) <link rel="stylesheet">
- 9.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <p> (d) <ul>
- 10.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 11.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h6>? (a) <h5> (b) <h6> (c) <h2> (d) <h1>
- 12.🔤 In “HTML”, what does the L stand for? (a) Line (b) Link (c) Laptop (d) Language
- 13.Which of these is true of a web server? (a) opens web pages for us (b) stores a website’s files (c) colours code to help us (d) has an address bar
- 14.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h5> or <h6>? (a) <h6> (b) <h2> (c) <h5> (d) <h4>
-
15.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="200"> (a) A red kite (b) Map of India (c) width (d) kite.png -
16.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Kites fly high<br>Rivers flow<br>Birds sing</p> -
17.🔍 Which line is missing its closing tag?
line 1: <h3>The red kite
line 2: <h2>Hello, world!</h2>
line 3: <i>My best friend</i> (a) line 3 (b) line 1 (c) line 2 -
18.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>Our school trip</p>
<!-- <p>I love mangoes.</p> -->
<p>My pets</p> (a) My pets (b) I love mangoes. (c) Our school trip (d) Rain today -
19.🔗 Where does this link open?
<a href="contact.html">Maths fun</a> (a) in a new tab (b) in the same tab -
20.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Cricket is fun.</p>
<p>My pets</p>
<h2>Our school trip</h2>
<p>Good morning!</p> -
21.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>My pets</p> -->
<p>Hello, world!</p>
<p>Our school trip</p> (a) Hello, world! (b) Our school trip (c) The red kite (d) My pets - 22.True or false: <table> goes in the body. (a) False (b) True
- 23.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
24.📋 What number does the browser show next to “Grapes”?
<ol start="2">
<li>Mango</li>
<li>Grapes</li>
<li>Guava</li>
<li>Jamun</li>
<li>Orange</li>
</ol> - 25.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
- 26.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank
-
27.🔗 Where does this link open?
<a href="contact.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab -
28.🔍 One closing tag is missing. Which one?
<small>Good morning!
<u>I love mangoes.</u>
<b>My pets</b> (a) </u> (b) </small> (c) </h3> (d) </b> -
29.🔗 Which words do you click on?
<a href="about.html">Play games</a> (a) About us (b) Play games (c) href (d) about.html - 30.Which of these has a closing tag? (a) <img> (b) <meta> (c) <input> (d) <ul>
- 31.True or false: <ol> shows bullet points. (a) False (b) True
- 32.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) width (c) height (d) src
- 33.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) editor (d) attribute
-
34.🔗 Which words do you click on?
<a href="maths.html">Take the quiz</a> (a) href (b) Play games (c) maths.html (d) Take the quiz - 35.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
- 36.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
37.🔗 Which address opens when you click this link?
<a href="https://example.com">Maths fun</a> (a) Maths fun (b) maths.html (c) https://example.com (d) art.html - 38.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
39.🔗 Where does this link open?
<a href="art.html">Art corner</a> (a) in a new tab (b) in the same tab - 40.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) sends pages over the net (d) opens web pages for us
Answer key
- 3
- alt
- <h5>
- My pets
- </b>
- href
- shows pages from the web
- <h1>
- <li>
- an opening tag
- <h6>
- Language
- stores a website’s files
- <h2>
- A red kite
- 5
- line 1
- I love mangoes.
- in the same tab
- 2
- My pets
- True
- an empty tag
- 3
- <ol>
- opens it in a new tab
- in a new tab
- </small>
- Play games
- <ul>
- False
- width
- element
- Take the quiz
- to leave notes
- No
- https://example.com
- has a closing tag
- in the same tab
- sends pages over the net
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids