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.🔍 One closing tag is missing. Which one?
<i>My best friend
<h1>My pets</h1>
<p>Our school trip</p> (a) </h1> (b) </em> (c) </i> (d) </p> - 2.📝 What do we need to write HTML? (a) a printer (b) a microphone (c) a plain text editor (d) a paintbrush
-
3.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>I love mangoes.</p>
<p>Fun facts</p> - 4.True or false: HTML on its own cannot make a form. (a) False (b) True
-
5.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Rain today</p> -->
<p>Hello, world!</p> (a) Hello, world! (b) Rain today (c) My pets -
6.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p>
<p>My best friend</p>
<p>Fun facts</p> (a) Our school trip (b) My best friend (c) I love mangoes. (d) Fun facts - 7.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) an attribute (d) a comment
-
8.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Good morning!</p>
<h4>The red kite</h4>
<p>Rain today</p>
<p>Rain today</p> - 9.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <h1> (d) <meta charset="utf-8">
- 10.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h2>? (a) <h1> (b) <h3> (c) <h2> (d) <h4>
-
11.📋 What number does the browser show next to “Mango”?
<ol start="9">
<li>Jamun</li>
<li>Papaya</li>
<li>Mango</li>
</ol> - 12.True or false: a code editor saves our .html files. (a) True (b) False
-
13.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red<br>Stars shine<br>Sky is blue<br>Birds sing</p> -
14.🔍 One closing tag is missing. Which one?
<b>I love mangoes.
<i>Good morning!</i>
<h1>The red kite</h1> (a) </b> (b) </i> (c) </h1> (d) </em> -
15.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>I like to read.</p>
</body>
</html> (a) Art Gallery (b) All about me (c) body (d) I like to read. - 16.Which of these has a closing tag? (a) <input> (b) <meta> (c) <li> (d) <br>
- 17.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 18.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
- 19.Which of these is an opening tag? (a) </h1> (b) </li> (c) </title> (d) <b>
- 20.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h6> or <h2>? (a) <h3> (b) <h6> (c) <h2> (d) <h4>
- 21.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 22.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) height (c) alt (d) src
- 23.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h2> or <h4>? (a) <h5> (b) <h4> (c) <h2> (d) <h6>
- 24.True or false: <link rel="stylesheet"> goes in the head. (a) True (b) False
- 25.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
-
26.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="100"> (a) width (b) Our school bus (c) moon.png (d) The full moon -
27.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Good morning!</p>
<h3>Cricket is fun.</h3>
<p>My pets</p>
<p>Fun facts</p> -
28.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>Our school trip</p>
<!-- <p>Cricket is fun.</p> --> -
29.🔗 Which address opens when you click this link?
<a href="contact.html">Art corner</a> (a) maths.html (b) contact.html (c) Art corner (d) https://example.com - 30.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h3>? (a) <h4> (b) <h3> (c) <h5> (d) <h1>
- 31.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
- 32.Which of these is an opening tag? (a) </b> (b) </li> (c) </title> (d) <h1>
-
33.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Our school trip</p>
<!-- <p>Good morning!</p> --> - 34.📋 Which list suits a shopping list in any order? (a) <ul> (b) <ol> (c) <br> (d) <hr>
- 35.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
-
36.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Rain today</p>
<p>My best friend</p>
<p>The red kite</p> - 37.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to load it faster (d) to colour it
-
38.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Mango</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers -
39.🔗 Which words do you click on?
<a href="art.html">Play games</a> (a) Play games (b) About us (c) art.html (d) href - 40.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
Answer key
- </i>
- a plain text editor
- 3
- False
- Rain today
- Our school trip
- an attribute
- 2
- <h1>
- <h4>
- 11
- True
- 5
- </b>
- All about me
- <li>
- No
- src
- <b>
- <h2>
- Yes
- width
- <h2>
- True
- in the body
- The full moon
- 2
- 2
- contact.html
- <h1>
- <h6>
- <h1>
- 1
- <ul>
- <a>
- 4
- to describe the image
- bullets
- Play games
- has a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids