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 line is missing its closing tag?
line 1: <h3>The red kite
line 2: <h2>Rain today</h2>
line 3: <em>I love mangoes.</em> (a) line 1 (b) line 2 (c) line 3 - 2.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h1>? (a) <h4> (b) <h2> (c) <h3> (d) <h1>
- 3.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the doctype (d) the body
-
4.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>The red kite</p> -->
<!-- <p>My pets</p> -->
<p>My best friend</p> -
5.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Good morning!</p>
<p>Fun facts</p>
<p>Rain today</p> (a) Good morning! (b) Rain today (c) The red kite (d) Fun facts - 6.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h1> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
- 7.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 8.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
-
9.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Orange</li>
<li>Guava</li>
<li>Papaya</li>
</ul> -
10.🔗 Where does this link open?
<a href="about.html">Visit the site</a> (a) in the same tab (b) in a new tab - 11.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
12.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="50"> (a) cake.jpg (b) Map of India (c) dog.jpg (d) map.png - 13.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
-
14.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="400"> - 15.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 16.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</body>”? (a) <!DOCTYPE html> (b) </body>
-
17.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) Maths fun (b) href (c) Visit the site (d) contact.html - 18.📝 What does <p> make? (a) a table (b) a paragraph (c) a picture (d) a link
-
19.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>Cricket is fun.</p>
<p>Rain today</p>
<h4>Cricket is fun.</h4>
<h3>Our school trip</h3> - 20.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) href (d) id
- 21.True or false: <h1> goes in the head. (a) True (b) False
- 22.True or false: in <img>, width names the picture file. (a) False (b) True
-
23.🔗 Which words do you click on?
<a href="https://example.com">Take the quiz</a> (a) href (b) https://example.com (c) Play games (d) Take the quiz - 24.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
- 25.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
- 26.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 27.Which of these has a closing tag? (a) <input> (b) <meta> (c) <br> (d) <title>
-
28.📋 What number does the browser show next to “Guava”?
<ol start="6">
<li>Banana</li>
<li>Guava</li>
<li>Jamun</li>
<li>Papaya</li>
</ol> - 29.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
- 30.True or false: <br> has a closing tag. (a) False (b) True
- 31.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 32.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
-
33.🔗 Which address opens when you click this link?
<a href="maths.html">Contact us</a> (a) maths.html (b) Contact us (c) news.html (d) art.html - 34.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
- 35.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h4> or <h6>? (a) <h3> (b) <h1> (c) <h6> (d) <h4>
- 36.Which of these is a closing tag? (a) <title> (b) <p> (c) </h1> (d) <b>
-
37.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Grapes</li>
<li>Mango</li>
<li>Banana</li>
<li>Jamun</li>
<li>Guava</li>
</ol> -
38.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<!-- <p>Fun facts</p> -->
<p>My best friend</p> - 39.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Laptop (d) Language
- 40.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h6> or <h1>? (a) <h3> (b) <h5> (c) <h1> (d) <h6>
Answer key
- line 1
- <h4>
- the body
- 1
- The red kite
- <h1>
- has a closing tag
- <h6>
- 6
- in the same tab
- Yes
- map.png
- -->
- 400
- has a closing tag
- <!DOCTYPE html>
- Visit the site
- a paragraph
- 3
- href
- False
- False
- Take the quiz
- True
- a web browser
- an opening tag
- <title>
- 7
- to leave notes
- False
- Yes
- in the head
- maths.html
- 6
- <h6>
- </h1>
- 6
- 4
- Language
- <h6>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids