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 of these is an opening tag? (a) </b> (b) </body> (c) <title> (d) </p>
- 2.True or false: <ol> is an unordered list. (a) False (b) True
-
3.🔍 Which line is missing its closing tag?
line 1: <i>Cricket is fun.</i>
line 2: <strong>My pets
line 3: <u>Fun facts</u> (a) line 3 (b) line 2 (c) line 1 - 4.Which of these is an opening tag? (a) </li> (b) </title> (c) <p> (d) </p>
- 5.True or false: HTML on its own can add pictures to a page. (a) True (b) False
- 6.🔠 Which tag is the least important heading? (a) <h6> (b) <h3> (c) <p> (d) <h1>
-
7.🔗 Which words do you click on?
<a href="https://example.com">Contact us</a> (a) Contact us (b) href (c) https://example.com (d) Visit the site - 8.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <p> (d) <h6>
-
9.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Good morning!</p>
<h3>Cricket is fun.</h3>
<h4>Cricket is fun.</h4> -
10.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Planets</h1>
<p>Try this poha.</p>
</body>
</html> (a) Space Facts (b) index.html (c) Try this poha. (d) Planets - 11.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
- 12.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
- 13.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 14.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as one space (d) as a dot
-
15.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Banana</li>
<li>Papaya</li>
<li>Guava</li>
</ul> -
16.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>Rain today</p>
<p>My pets</p>
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> --> -
17.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>My pets</p>
<p>I love mangoes.</p>
<!-- <p>My best friend</p> --> -
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) width (b) cake.jpg (c) Birthday cake (d) A happy dog - 19.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
20.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Our school trip</p>
<p>The red kite</p> - 21.True or false: in <img>, src sets how tall it is. (a) False (b) True
- 22.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <p> (d) <style>
- 23.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
24.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>The red kite</p>
<h4>My pets</h4> - 25.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
-
26.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) A tiger asleep (b) kite.png (c) map.png (d) tiger.jpg -
27.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p> (a) I love mangoes. (b) Fun facts (c) Cricket is fun. - 28.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
29.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Rain today</p>
<p>My pets</p> - 30.Which of these is an empty tag? (a) <li> (b) <p> (c) <h1> (d) <img>
- 31.Which of these goes in the head? (a) <img> (b) <h1> (c) <style> (d) <a>
-
32.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Cricket is fun.</p>
<p>The red kite</p>
<p>Good morning!</p>
<p>Rain today</p> -
33.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine<br>Birds sing</p> - 34.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) </h3> (c) <\h3> (d) <h3>
-
35.🔍 Which line is missing its closing tag?
line 1: <small>My best friend</small>
line 2: <em>Cricket is fun.</em>
line 3: <h1>My pets (a) line 2 (b) line 3 (c) line 1 - 36.🏷️ Which is the closing tag for <b>? (a) <b/> (b) <b> (c) </b> (d) <\b>
- 37.True or false: <ul> goes in the body. (a) False (b) True
- 38.📄 Can HTML on its own keep a high score? (a) No (b) Yes
- 39.📝 What does <br> do? (a) makes a list (b) starts a new line (c) adds a picture (d) makes text bold
- 40.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--
Answer key
- <title>
- False
- line 2
- <p>
- True
- <h6>
- Contact us
- <h1>
- 3
- Space Facts
- <ul>
- <a>
- Yes
- as one space
- 4
- 4
- 3
- Birthday cake
- an opening tag
- 3
- False
- <p>
- an opening tag
- 2
- 6
- tiger.jpg
- Fun facts
- Yes
- 3
- <img>
- <style>
- 1
- 3
- </h3>
- line 3
- </b>
- True
- No
- starts a new line
- <!--
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids