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 heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h6>? (a) <h1> (b) <h5> (c) <h6> (d) <h4>
-
2.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="250"> (a) Map of India (b) width (c) Birthday cake (d) map.png - 3.True or false: in <img>, height sets how tall it is. (a) True (b) False
- 4.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
-
5.🔍 One closing tag is missing. Which one?
<h1>Our school trip</h1>
<b>My pets</b>
<h3>My best friend (a) </h1> (b) </h3> (c) </b> (d) </small> - 6.Which of these is true of a web server? (a) opens web pages for us (b) has an address bar (c) sends pages over the net (d) shows pages from the web
-
7.📋 What number does the browser show next to “Litchi”?
<ol start="5">
<li>Grapes</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Orange</li>
</ol> - 8.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
- 9.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 10.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <!DOCTYPE html> (c) <head> (d) </head>
- 11.True or false: in <img>, alt shows if the image fails. (a) True (b) False
-
12.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Fun facts</p>
<p>Rain today</p> (a) Fun facts (b) I love mangoes. (c) Rain today -
13.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Litchi</li>
</ol> - 14.Which of these is an empty tag? (a) <h1> (b) <li> (c) <ul> (d) <meta>
-
15.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Guava</li>
<li>Litchi</li>
<li>Papaya</li>
</ol> -
16.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Kites fly high<br>Sky is blue<br>Stars shine</p> -
17.🔍 Which line is missing its closing tag?
line 1: <h3>Cricket is fun.</h3>
line 2: <em>Good morning!</em>
line 3: <b>The red kite (a) line 1 (b) line 2 (c) line 3 - 18.True or false: <ul> shows 1, 2, 3 numbers. (a) True (b) False
- 19.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
-
20.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) games.html (b) Contact us (c) Visit the site (d) href - 21.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
22.🔍 Which line is missing its closing tag?
line 1: <em>My pets</em>
line 2: <u>The red kite
line 3: <strong>Good morning!</strong> (a) line 3 (b) line 2 (c) line 1 -
23.🔗 Which address opens when you click this link?
<a href="about.html">Contact us</a> (a) about.html (b) https://example.com (c) contact.html (d) Contact us - 24.True or false: in <img>, height sets how wide it is. (a) True (b) False
-
25.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Our school trip</p>
<!-- <p>Hello, world!</p> --> (a) My pets (b) Our school trip (c) Hello, world! -
26.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Art corner</a> (a) in a new tab (b) in the same tab -
27.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<!-- <p>The red kite</p> --> (a) Cricket is fun. (b) Hello, world! (c) The red kite - 28.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
- 29.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) attribute (d) element
- 30.Which of these is an opening tag? (a) </p> (b) </title> (c) </body> (d) <title>
- 31.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
-
32.📋 What number does the browser show next to “Jamun”?
<ol start="5">
<li>Papaya</li>
<li>Jamun</li>
<li>Guava</li>
<li>Litchi</li>
</ol> - 33.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h3>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
-
34.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="250"> (a) Birthday cake (b) A happy dog (c) width (d) cake.jpg - 35.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 36.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
- 37.Which of these is a closing tag? (a) </body> (b) <h1> (c) <li> (d) <p>
- 38.📄 Can HTML on its own make links to pages? (a) Yes (b) No
-
39.🔗 Which address opens when you click this link?
<a href="https://example.com">Play games</a> (a) maths.html (b) https://example.com (c) Play games (d) art.html - 40.💬 How does an HTML comment end? (a) */ (b) --> (c) // (d) >>
Answer key
- <h6>
- Map of India
- True
- True
- </h3>
- sends pages over the net
- 6
- <h1>
- an opening tag
- <!DOCTYPE html>
- True
- I love mangoes.
- 2
- <meta>
- 2
- 5
- line 3
- False
- <ol>
- Contact us
- No
- line 2
- about.html
- False
- Hello, world!
- in a new tab
- The red kite
- <ul>
- element
- <title>
- a web browser
- 6
- <h1>
- Birthday cake
- a closing tag
- href
- </body>
- Yes
- https://example.com
- -->
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids