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 text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Our school trip</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) Our school trip (c) My best friend -
2.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Hello, world!</p>
<p>Our school trip</p> - 3.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h6>? (a) <h5> (b) <h6> (c) <h4> (d) <h3>
- 4.🔢 In a basic web page file, which comes first: “</body>” or “<head>”? (a) <head> (b) </body>
-
5.📋 What number does the browser show next to “Banana”?
<ol start="3">
<li>Mango</li>
<li>Papaya</li>
<li>Guava</li>
<li>Banana</li>
</ol> - 6.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
7.🔗 Which address opens when you click this link?
<a href="quiz.html">Play games</a> (a) games.html (b) Play games (c) quiz.html (d) about.html -
8.🔗 Where does this link open?
<a href="news.html">Contact us</a> (a) in a new tab (b) in the same tab - 9.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h2>? (a) <h4> (b) <h6> (c) <h2> (d) <h5>
- 10.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
- 11.Which of these is true of a web browser? (a) saves our .html files (b) colours code to help us (c) sends pages over the net (d) opens web pages for us
- 12.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) height (c) width (d) alt
- 13.Which of these goes in the body? (a) <style> (b) <h1> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
- 14.Which of these is an empty tag? (a) <li> (b) <title> (c) <p> (d) <meta>
-
15.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Orange</li>
<li>Banana</li>
<li>Grapes</li>
<li>Mango</li>
</ol> -
16.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>My best friend</p> -->
<!-- <p>Fun facts</p> --> - 17.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 18.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
-
19.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>My pets</p>
<h4>Fun facts</h4> -
20.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="250"> -
21.🔍 One closing tag is missing. Which one?
<strong>Cricket is fun.</strong>
<small>Our school trip
<em>Rain today</em> (a) </strong> (b) </em> (c) </small> (d) </b> - 22.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
23.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>My pets</p> -->
<p>I love mangoes.</p> - 24.True or false: <ul> shows 1, 2, 3 numbers. (a) False (b) True
-
25.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Stars shine</p> - 26.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h6>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
-
27.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Guava</li>
<li>Jamun</li>
</ul> - 28.Which of these is an opening tag? (a) <li> (b) </p> (c) </h1> (d) </title>
- 29.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h4> or <h1>? (a) <h4> (b) <h2> (c) <h1> (d) <h5>
- 30.True or false: <a> goes in the head. (a) True (b) False
- 31.Which of these has a closing tag? (a) <br> (b) <input> (c) <ul> (d) <meta>
- 32.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) at the bottom (d) on the browser tab
- 33.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
34.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Hello, world!</p>
<p>Our school trip</p>
<!-- <p>Cricket is fun.</p> --> (a) Cricket is fun. (b) Our school trip (c) Hello, world! (d) The red kite - 35.💬 How does an HTML comment start? (a) /* (b) // (c) # (d) <!--
-
36.🔗 Where does this link open?
<a href="https://example.com">Maths fun</a> (a) in the same tab (b) in a new tab -
37.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="250"> (a) A red kite (b) cake.jpg (c) kite.png (d) map.png - 38.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) <body>
- 39.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <h2/> (c) <\h2> (d) <h2>
- 40.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) height (c) alt (d) src
Answer key
- My best friend
- 2
- <h3>
- <head>
- 6
- an opening tag
- quiz.html
- in the same tab
- <h2>
- <a>
- opens web pages for us
- alt
- <h1>
- <meta>
- 5
- 1
- Yes
- 6
- 2
- 250
- </small>
- has a closing tag
- 1
- False
- 2
- <h6>
- 3
- <li>
- <h1>
- False
- <ul>
- on the browser tab
- has a closing tag
- Cricket is fun.
- <!--
- in the same tab
- kite.png
- <!DOCTYPE html>
- </h2>
- width
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids