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.True or false: <a> goes in the body. (a) False (b) True
-
2.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>My pets</p> -->
<p>The red kite</p> -
3.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> --> (a) Cricket is fun. (b) My best friend (c) I love mangoes. - 4.True or false: in <img>, src is read by screen readers. (a) False (b) True
- 5.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h6>
- 6.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 7.Which of these goes in the body? (a) <style> (b) <title> (c) <a> (d) <meta charset="utf-8">
- 8.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h2>? (a) <h4> (b) <h5> (c) <h1> (d) <h2>
-
9.📋 What number does the browser show next to “Papaya”?
<ol start="5">
<li>Litchi</li>
<li>Papaya</li>
<li>Mango</li>
</ol> - 10.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
-
11.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab - 12.True or false: in <img>, src sets how tall it is. (a) True (b) False
- 13.💬 How does an HTML comment start? (a) # (b) <!-- (c) // (d) /*
- 14.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
15.🔗 Which address opens when you click this link?
<a href="about.html">Maths fun</a> (a) https://example.com (b) about.html (c) contact.html (d) Maths fun -
16.🔗 Which words do you click on?
<a href="maths.html">Art corner</a> (a) School news (b) maths.html (c) href (d) Art corner - 17.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
18.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>Rain today</h2>
<p>Hello, world!</p>
<p>My pets</p>
<p>Our school trip</p> -
19.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>My pets</p>
<p>I love mangoes.</p>
<h2>Our school trip</h2>
<p>Our school trip</p> - 20.🔤 In “HTML”, what does the L stand for? (a) Link (b) Laptop (c) Language (d) Line
-
21.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine<br>Kites fly high<br>Rivers flow</p> - 22.True or false: in <img>, width sets how tall it is. (a) True (b) False
- 23.True or false: in <img>, alt describes the picture. (a) False (b) True
- 24.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h6>? (a) <h1> (b) <h5> (c) <h3> (d) <h6>
-
25.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>My pets</p>
<p>My pets</p>
<p>My pets</p>
<p>Rain today</p>
<h2>Rain today</h2> - 26.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h6> or <h1>? (a) <h1> (b) <h6> (c) <h2> (d) <h5>
- 27.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <img> (d) <a>
- 28.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) at the bottom (d) on the browser tab
-
29.🔗 Which words do you click on?
<a href="quiz.html">About us</a> (a) About us (b) Contact us (c) href (d) quiz.html - 30.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h5> or <h2>? (a) <h4> (b) <h2> (c) <h5> (d) <h3>
- 31.True or false: HTML on its own can add up two numbers. (a) False (b) True
- 32.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</html>”? (a) <!DOCTYPE html> (b) </html>
- 33.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h4>? (a) <h2> (b) <h6> (c) <h1> (d) <h4>
- 34.Which of these is an empty tag? (a) <li> (b) <b> (c) <meta> (d) <p>
- 35.Which of these has a closing tag? (a) <img> (b) <meta> (c) <p> (d) <br>
- 36.Which of these is an opening tag? (a) </li> (b) </body> (c) </h1> (d) <p>
-
37.🔍 Which line is missing its closing tag?
line 1: <h1>Good morning!
line 2: <strong>Our school trip</strong>
line 3: <i>I love mangoes.</i> (a) line 2 (b) line 1 (c) line 3 - 38.📝 What does <p> make? (a) a paragraph (b) a link (c) a picture (d) a table
-
39.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) Visit the site (b) href (c) contact.html (d) Maths fun -
40.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> --> (a) Hello, world! (b) The red kite (c) I love mangoes.
Answer key
- True
- 1
- Cricket is fun.
- False
- <h1>
- No
- <a>
- <h1>
- 6
- opens it in a new tab
- in a new tab
- False
- <!--
- has a closing tag
- about.html
- Art corner
- has a closing tag
- 4
- 2
- Language
- 4
- False
- True
- <h1>
- 5
- <h1>
- <img>
- on the browser tab
- About us
- <h2>
- False
- <!DOCTYPE html>
- <h1>
- <meta>
- <p>
- <p>
- line 1
- a paragraph
- Visit the site
- Hello, world!
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids