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 words do you click on?
<a href="maths.html">Maths fun</a> (a) href (b) Art corner (c) maths.html (d) Maths fun - 2.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h1>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
-
3.🔗 Which address opens when you click this link?
<a href="contact.html">Visit the site</a> (a) Visit the site (b) contact.html (c) https://example.com (d) maths.html - 4.🔍 Which is the odd one out? (a) is where we type code (b) stores a website’s files (c) sends pages over the net (d) hosts websites online
-
5.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>The red kite</p>
<p>Hello, world!</p> (a) Hello, world! (b) Rain today (c) The red kite - 6.True or false: <p> is an empty tag. (a) False (b) True
-
7.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<!-- <p>My pets</p> --> -
8.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Jamun</li>
</ol> (a) bullets (b) numbers - 9.🏷️ Which is the closing tag for <b>? (a) <b/> (b) </b> (c) <b> (d) <\b>
- 10.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) opens it in a new tab (d) makes it bold
- 11.Which of these is an opening tag? (a) <body> (b) </p> (c) </body> (d) </li>
- 12.📝 What do we need to write HTML? (a) a plain text editor (b) a printer (c) a microphone (d) a paintbrush
-
13.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow<br>Kites fly high</p> -
14.🔍 One closing tag is missing. Which one?
<h3>Cricket is fun.
<p>I love mangoes.</p>
<h2>Good morning!</h2> (a) </h1> (b) </p> (c) </h3> (d) </h2> - 15.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h1> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h5>
- 16.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
- 17.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <!DOCTYPE html> (d) <html>
- 18.📝 What does <p> make? (a) a link (b) a table (c) a picture (d) a paragraph
-
19.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>The red kite</h2>
<p>Our school trip</p> - 20.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
21.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="100"> (a) cake.jpg (b) kite.png (c) A red kite (d) map.png - 22.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
- 23.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) alt (c) src (d) height
- 24.True or false: a web browser turns HTML into a page. (a) False (b) True
- 25.📄 Can HTML on its own count button clicks? (a) No (b) Yes
- 26.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
- 27.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <html> (c) </body> (d) <body>
- 28.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) </h3> (c) <h3/> (d) <\h3>
- 29.🌍 Which program shows a web page to us? (a) a paint program (b) a web browser (c) a music player (d) a calculator
-
30.🔗 Which address opens when you click this link?
<a href="about.html">Contact us</a> (a) https://example.com (b) Contact us (c) contact.html (d) about.html - 31.📄 Can HTML on its own make headings? (a) No (b) Yes
-
32.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>The red kite</p>
<p>Rain today</p>
<p>Our school trip</p> (a) Fun facts (b) Rain today (c) The red kite (d) Our school trip - 33.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to load it faster (d) to describe the image
- 34.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <a> (d) <title>
- 35.📄 Can HTML on its own keep a high score? (a) Yes (b) No
-
36.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Here is my best one.</p>
</body>
</html> (a) body (b) Here is my best one. (c) Riya’s Recipes (d) Easy snacks -
37.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Cricket is fun.</p>
<p>Our school trip</p>
<p>Hello, world!</p> - 38.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <hr> (d) <br>
- 39.Which of these is an opening tag? (a) </b> (b) </li> (c) <li> (d) </p>
- 40.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) height (c) width (d) src
Answer key
- Maths fun
- <h5>
- contact.html
- is where we type code
- Rain today
- False
- 2
- numbers
- </b>
- opens it in a new tab
- <body>
- a plain text editor
- 3
- </h3>
- <h1>
- in the body
- <!DOCTYPE html>
- a paragraph
- 2
- Yes
- kite.png
- <!--
- alt
- True
- No
- True
- </html>
- </h3>
- a web browser
- about.html
- Yes
- Fun facts
- to describe the image
- <a>
- No
- Easy snacks
- 4
- <ol>
- <li>
- height
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids