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 links to pages? (a) No (b) Yes
- 2.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <h1> (d) <br>
-
3.🔗 Where does this link open?
<a href="maths.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab - 4.True or false: HTML on its own can make links to pages. (a) True (b) False
-
5.🔍 Which line is missing its closing tag?
line 1: <strong>Rain today
line 2: <i>Our school trip</i>
line 3: <h1>Hello, world!</h1> (a) line 3 (b) line 2 (c) line 1 -
6.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>Our school trip</p>
<!-- <p>The red kite</p> -->
<!-- <p>Hello, world!</p> --> - 7.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h4> or <h3>? (a) <h2> (b) <h4> (c) <h3> (d) <h1>
- 8.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 10 (c) 3 (d) 6
- 9.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h4> or <h2>? (a) <h6> (b) <h4> (c) <h2> (d) <h1>
- 10.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to load it faster (d) to describe the image
- 11.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h5> or <h3>? (a) <h1> (b) <h3> (c) <h4> (d) <h5>
- 12.📝 What does <hr> draw? (a) a link (b) a line across the page (c) a picture (d) a table
-
13.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>The red kite</p> -->
<p>Fun facts</p>
<p>My pets</p> (a) The red kite (b) Fun facts (c) My pets (d) My best friend - 14.Which of these is an empty tag? (a) <h1> (b) <p> (c) <meta> (d) <b>
-
15.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Good morning!</p>
<p>My pets</p>
<!-- <p>My best friend</p> --> (a) Fun facts (b) My pets (c) My best friend (d) Good morning! - 16.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
17.🔗 Which words do you click on?
<a href="games.html">About us</a> (a) Contact us (b) href (c) About us (d) games.html - 18.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 19.🔍 Which is the odd one out? (a) is where we type code (b) saves our .html files (c) colours code to help us (d) opens web pages for us
-
20.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red<br>Kites fly high</p> - 21.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h3>? (a) <h5> (b) <h6> (c) <h3> (d) <h4>
- 22.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
- 23.🔢 In a basic web page file, which comes first: “</body>” or “<body>”? (a) <body> (b) </body>
- 24.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h5> or <h1>? (a) <h5> (b) <h2> (c) <h4> (d) <h1>
- 25.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) editor (d) attribute
-
26.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Riya’s Recipes (b) body (c) All about me (d) Here is my best one. - 27.Which of these is a closing tag? (a) <h1> (b) <title> (c) <b> (d) </p>
-
28.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Orange</li>
<li>Mango</li>
<li>Guava</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Papaya</li>
</ol> - 29.True or false: in <img>, alt names the picture file. (a) True (b) False
- 30.True or false: <p> has a closing tag. (a) True (b) False
- 31.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) in a big heading (d) on the browser tab
-
32.🔗 Which words do you click on?
<a href="maths.html">Visit the site</a> (a) href (b) maths.html (c) Visit the site (d) Maths fun -
33.🔍 Which line is missing its closing tag?
line 1: <b>The red kite</b>
line 2: <h2>Hello, world!
line 3: <p>Good morning!</p> (a) line 1 (b) line 3 (c) line 2 - 34.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
-
35.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Fun facts</p>
<p>Cricket is fun.</p>
<p>Good morning!</p>
<!-- <p>I love mangoes.</p> --> -
36.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Mango</li>
<li>Guava</li>
</ul> -
37.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue<br>Rivers flow<br>Roses are red<br>Stars shine</p> - 38.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h1> or <h5>? (a) <h1> (b) <h5> (c) <h4> (d) <h3>
- 39.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
- 40.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
Answer key
- Yes
- <h1>
- in a new tab
- True
- line 1
- 2
- <h1>
- 1
- <h6>
- to describe the image
- <h5>
- a line across the page
- The red kite
- <meta>
- My best friend
- an empty tag
- About us
- a closing tag
- opens web pages for us
- 3
- <h3>
- <h1>
- <body>
- <h1>
- element
- All about me
- </p>
- 5
- False
- True
- on the browser tab
- Visit the site
- line 2
- <!--
- 4
- 3
- 5
- <h5>
- False
- a code editor
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids