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.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Sky is blue<br>Rivers flow<br>Kites fly high<br>Roses are red</p> - 2.True or false: HTML on its own can run a game loop. (a) True (b) False
- 3.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
4.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Banana</li>
</ol> (a) numbers (b) bullets -
5.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>My best friend</p>
<!-- <p>Hello, world!</p> --> - 6.🏷️ Which is the closing tag for <b>? (a) <b> (b) <b/> (c) <\b> (d) </b>
-
7.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>My pets</p>
<p>I love mangoes.</p> (a) Our school trip (b) My pets (c) I love mangoes. - 8.🏷️ Which is the closing tag for <p>? (a) <p/> (b) <p> (c) <\p> (d) </p>
- 9.🔢 In a basic web page file, which comes first: “</head>” or “</html>”? (a) </html> (b) </head>
- 10.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) height (c) src (d) alt
- 11.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 12.True or false: <ol> lists things in any order. (a) False (b) True
-
13.🔗 Where does this link open?
<a href="art.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab -
14.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>My best friend</h2>
<p>The red kite</p> - 15.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <ul> (d) <li>
- 16.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to make it bigger (d) to colour it
-
17.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>My best friend</p>
<p>Our school trip</p> (a) Rain today (b) Our school trip (c) My best friend -
18.🔍 One closing tag is missing. Which one?
<small>My best friend</small>
<p>Our school trip</p>
<b>My pets (a) </h2> (b) </p> (c) </b> (d) </small> - 19.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h3>? (a) <h3> (b) <h5> (c) <h6> (d) <h4>
- 20.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
-
21.🔍 One closing tag is missing. Which one?
<h2>My best friend
<h3>Hello, world!</h3>
<b>Fun facts</b> (a) </em> (b) </h3> (c) </h2> (d) </b> - 22.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
23.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="100"> (a) width (b) Map of India (c) A red kite (d) kite.png - 24.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) [ (d) (
- 25.Which of these is an empty tag? (a) <li> (b) <h1> (c) <input> (d) <title>
-
26.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<!-- <p>Our school trip</p> -->
<p>Good morning!</p> (a) Good morning! (b) Fun facts (c) Our school trip - 27.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
- 28.📄 Can HTML on its own run a game loop? (a) Yes (b) No
-
29.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>My pets</p>
<!-- <p>Cricket is fun.</p> --> -
30.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) About us (b) href (c) Contact us (d) https://example.com - 31.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <p> (d) <h6>
- 32.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 33.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <style> (d) <h1>
-
34.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="350"> (a) An old fort (b) tiger.jpg (c) fort.jpg (d) kite.png -
35.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h4>The red kite</h4>
<h4>My best friend</h4> -
36.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="200"> (a) width (b) Our school bus (c) The full moon (d) moon.png -
37.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Banana</li>
</ul> -
38.🔗 Where does this link open?
<a href="quiz.html">Visit the site</a> (a) in the same tab (b) in a new tab -
39.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h4>Good morning!</h4>
<h3>Good morning!</h3>
<h2>Fun facts</h2> - 40.True or false: <ol> shows bullet points. (a) False (b) True
Answer key
- 5
- False
- an opening tag
- numbers
- 2
- </b>
- Our school trip
- </p>
- </head>
- height
- has a closing tag
- False
- in a new tab
- 2
- <li>
- to describe the image
- Rain today
- </b>
- <h3>
- -->
- </h2>
- a closing tag
- A red kite
- <
- <input>
- Our school trip
- Yes
- No
- 2
- About us
- <h1>
- Yes
- <h1>
- fort.jpg
- 3
- The full moon
- 2
- in the same tab
- 4
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids