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.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) { (d) [
- 2.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <img> (d) <p>
- 3.True or false: <ul> goes in the body. (a) False (b) True
-
4.🔗 Which address opens when you click this link?
<a href="contact.html">Visit the site</a> (a) maths.html (b) https://example.com (c) contact.html (d) Visit the site - 5.Which of these is an empty tag? (a) <img> (b) <p> (c) <b> (d) <li>
-
6.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h4>Hello, world!</h4>
<p>I love mangoes.</p> - 7.True or false: <b> is an empty tag. (a) False (b) True
-
8.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Papaya</li>
</ul> (a) bullets (b) numbers - 9.💬 How does an HTML comment start? (a) /* (b) <!-- (c) // (d) #
- 10.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
-
11.🔍 Which line is missing its closing tag?
line 1: <p>Cricket is fun.</p>
line 2: <u>Rain today
line 3: <h1>My pets</h1> (a) line 1 (b) line 2 (c) line 3 - 12.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <\h2> (c) <h2/> (d) </h2>
- 13.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
14.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) dog.jpg (b) The full moon (c) A happy dog (d) width -
15.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="250"> -
16.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>My best friend</p>
<p>Our school trip</p> (a) Our school trip (b) My best friend (c) The red kite -
17.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>My best friend</p>
<p>I love mangoes.</p>
<p>Good morning!</p>
<h2>My pets</h2> - 18.🏷️ HTML marks up text using ___. (a) keys (b) pixels (c) tags (d) wires
-
19.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Match report</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) body (b) Match report (c) My Hobbies (d) We won by 5 runs. -
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="200"> (a) kite.png (b) A red kite (c) Map of India (d) width - 21.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
-
22.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>My pets</p>
<h2>Hello, world!</h2> - 23.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h2> or <h5>? (a) <h2> (b) <h6> (c) <h3> (d) <h5>
-
24.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Papaya</li>
<li>Jamun</li>
<li>Banana</li>
<li>Orange</li>
<li>Grapes</li>
</ol> - 25.🔗 What does HyperText mean? (a) very big text (b) text in colour (c) text with links (d) secret text
- 26.True or false: <img> is an empty tag. (a) False (b) True
- 27.True or false: <li> goes inside ul or ol. (a) False (b) True
-
28.🔗 Which address opens when you click this link?
<a href="games.html">Play games</a> (a) about.html (b) Play games (c) contact.html (d) games.html - 29.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
- 30.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
- 31.Which of these goes in the head? (a) <table> (b) <img> (c) <meta charset="utf-8"> (d) <h1>
- 32.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <h1> (d) <p>
-
33.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<!-- <p>My best friend</p> --> (a) My best friend (b) I love mangoes. (c) Cricket is fun. - 34.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
- 35.📝 What does <p> make? (a) a link (b) a picture (c) a paragraph (d) a table
-
36.🔗 Which words do you click on?
<a href="maths.html">Art corner</a> (a) School news (b) href (c) maths.html (d) Art corner - 37.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 38.Which of these is an opening tag? (a) </title> (b) <b> (c) </p> (d) </b>
- 39.📝 What does <br> do? (a) makes a list (b) adds a picture (c) starts a new line (d) makes text bold
-
40.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p>
<!-- <p>My best friend</p> -->
Answer key
- <
- <p>
- True
- contact.html
- <img>
- 2
- False
- bullets
- <!--
- href
- line 2
- </h2>
- Yes
- A happy dog
- 250
- The red kite
- 4
- tags
- Match report
- A red kite
- a web browser
- 2
- <h2>
- 5
- text with links
- True
- True
- games.html
- <ol>
- True
- <meta charset="utf-8">
- <h1>
- My best friend
- in the head
- a paragraph
- Art corner
- an opening tag
- <b>
- starts a new line
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids