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.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
2.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p> -
3.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="100"> - 4.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 5.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h4> or <h2>? (a) <h4> (b) <h2> (c) <h6> (d) <h1>
- 6.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to show pictures (d) to add colour
- 7.Which of these is an opening tag? (a) <title> (b) </p> (c) </li> (d) </title>
-
8.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Our school trip</p> -->
<p>My best friend</p>
<p>Rain today</p> (a) My best friend (b) Our school trip (c) Hello, world! (d) Rain today - 9.Which of these is an opening tag? (a) <body> (b) </h1> (c) </li> (d) </title>
- 10.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <link rel="stylesheet"> (d) <img>
-
11.🔍 One closing tag is missing. Which one?
<strong>Rain today
<h3>Our school trip</h3>
<em>The red kite</em> (a) </h3> (b) </em> (c) </strong> (d) </h2> -
12.🔗 Which words do you click on?
<a href="news.html">Contact us</a> (a) Visit the site (b) news.html (c) Contact us (d) href - 13.📄 Can HTML on its own make headings? (a) Yes (b) No
-
14.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="50"> (a) An old fort (b) fort.jpg (c) A tiger asleep (d) width - 15.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h3> or <h1>? (a) <h3> (b) <h1> (c) <h6> (d) <h2>
-
16.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>Try this poha.</p>
</body>
</html> (a) Cricket Club (b) body (c) Planets (d) Try this poha. - 17.True or false: in <img>, height tells which image to load. (a) False (b) True
-
18.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>My best friend</h2>
<p>Rain today</p>
<h2>Our school trip</h2>
<h2>Cricket is fun.</h2> - 19.True or false: <hr> is an empty tag. (a) False (b) True
-
20.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Jamun</li>
<li>Mango</li>
<li>Grapes</li>
</ol> - 21.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) src (d) width
- 22.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) nowhere (d) at the bottom
- 23.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) src (c) height (d) alt
- 24.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h5>? (a) <h2> (b) <h3> (c) <h1> (d) <h5>
- 25.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
-
26.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing<br>Sky is blue<br>Roses are red</p> -
27.🔍 One closing tag is missing. Which one?
<h1>Good morning!
<em>The red kite</em>
<strong>My best friend</strong> (a) </em> (b) </h1> (c) </h2> (d) </strong> - 28.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h1> (d) <h6>
- 29.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
- 30.🔍 Which is the odd one out? (a) shows pages from the web (b) hosts websites online (c) has an address bar (d) opens web pages for us
- 31.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 32.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
-
33.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) width (b) An old fort (c) Our school bus (d) bus.jpg - 34.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Markup (c) Modern (d) Machine
- 35.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
-
36.🔗 Which address opens when you click this link?
<a href="about.html">Art corner</a> (a) https://example.com (b) about.html (c) Art corner (d) contact.html - 37.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as a new line (c) as 5 spaces (d) as one space
- 38.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
-
39.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>My pets</p>
<!-- <p>Cricket is fun.</p> --> -
40.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Our school trip</p>
<p>Rain today</p>
<p>My pets</p>
<p>Rain today</p>
<h2>I love mangoes.</h2>
Answer key
- has a closing tag
- 1
- 100
- an empty tag
- <h6>
- to leave notes
- <title>
- Our school trip
- <body>
- <img>
- </strong>
- Contact us
- Yes
- An old fort
- <h1>
- Planets
- False
- 2
- True
- 4
- src
- on the browser tab
- alt
- <h5>
- <ol>
- 4
- </h1>
- <h6>
- -->
- hosts websites online
- has a closing tag
- 6
- Our school bus
- Markup
- opens it in a new tab
- about.html
- as one space
- a paragraph
- 1
- 5
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids