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.📄 Can HTML on its own make tables? (a) No (b) Yes
- 2.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h5>? (a) <h5> (b) <h3> (c) <h1> (d) <h4>
- 3.True or false: <h1> goes in the body. (a) False (b) True
-
4.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Orange</li>
<li>Mango</li>
<li>Papaya</li>
<li>Jamun</li>
</ul> -
5.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>Fun facts</p> -->
<!-- <p>My best friend</p> --> - 6.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) hides the link (d) opens it in a new tab
-
7.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>My pets</p>
<!-- <p>Hello, world!</p> --> - 8.True or false: a code editor is where we type code. (a) True (b) False
- 9.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h1> or <h2>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
- 10.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h6> or <h1>? (a) <h6> (b) <h5> (c) <h4> (d) <h1>
-
11.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine<br>Birds sing<br>Kites fly high<br>Roses are red</p> -
12.🔍 One closing tag is missing. Which one?
<h1>I love mangoes.</h1>
<u>Rain today
<h2>My best friend</h2> (a) </h1> (b) </u> (c) </em> (d) </h2> - 13.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
- 14.Which of these has a closing tag? (a) <li> (b) <meta> (c) <br> (d) <img>
- 15.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 4 (d) 6
-
16.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) width (b) A red kite (c) A tiger asleep (d) tiger.jpg -
17.🔗 Where does this link open?
<a href="maths.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab - 18.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 19.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
-
20.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Space Facts (b) Welcome! (c) We won by 5 runs. (d) body - 21.💬 Does the browser show comments on the page? (a) Yes (b) No
- 22.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h3>? (a) <h4> (b) <h5> (c) <h1> (d) <h3>
-
23.🔗 Where does this link open?
<a href="about.html">Visit the site</a> (a) in the same tab (b) in a new tab - 24.🏷️ Which is the closing tag for <i>? (a) </i> (b) <i/> (c) <\i> (d) <i>
- 25.💬 How does an HTML comment end? (a) // (b) >> (c) */ (d) -->
- 26.Which of these is an empty tag? (a) <ul> (b) <b> (c) <title> (d) <hr>
-
27.🔍 One closing tag is missing. Which one?
<h2>My pets</h2>
<h1>The red kite</h1>
<small>Our school trip (a) </h2> (b) </h3> (c) </small> (d) </h1> - 28.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
-
29.🔗 Where does this link open?
<a href="maths.html" target="_blank">Maths fun</a> (a) in a new tab (b) in the same tab -
30.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) A tiger asleep (b) map.png (c) tiger.jpg (d) kite.png - 31.True or false: <img> has a closing tag. (a) True (b) False
-
32.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Our school trip</p> -->
<p>The red kite</p>
<p>Fun facts</p> - 33.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h5>? (a) <h1> (b) <h2> (c) <h6> (d) <h5>
-
34.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>Our school trip</h2>
<p>My best friend</p>
<h3>Our school trip</h3> - 35.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a link (d) a table
- 36.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
- 37.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
-
38.🔍 One closing tag is missing. Which one?
<small>The red kite</small>
<h1>Our school trip
<h2>Hello, world!</h2> (a) </h2> (b) </em> (c) </small> (d) </h1> - 39.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
40.🔍 Which line is missing its closing tag?
line 1: <strong>Hello, world!
line 2: <i>Good morning!</i>
line 3: <u>The red kite</u> (a) line 3 (b) line 1 (c) line 2
Answer key
- Yes
- <h5>
- True
- 5
- 1
- opens it in a new tab
- 1
- True
- <h1>
- <h1>
- 5
- </u>
- a web browser
- <li>
- 6
- A tiger asleep
- in a new tab
- No
- to describe the image
- Welcome!
- No
- <h1>
- in the same tab
- </i>
- -->
- <hr>
- </small>
- in the body
- in a new tab
- tiger.jpg
- False
- 3
- <h6>
- 3
- a line across the page
- <img>
- on the browser tab
- </h1>
- an empty tag
- line 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids