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 this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Banana</li>
<li>Papaya</li>
</ul> (a) bullets (b) numbers - 2.🔗 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
-
3.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) https://example.com (b) Contact us (c) href (d) About us -
4.🔗 Which words do you click on?
<a href="quiz.html">Maths fun</a> (a) quiz.html (b) href (c) Art corner (d) Maths fun -
5.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Our school trip</p>
<p>Rain today</p>
<h2>The red kite</h2>
<p>Our school trip</p> -
6.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="350"> (a) fort.jpg (b) An old fort (c) A tiger asleep (d) width -
7.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="50"> -
8.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>My pets</h2>
<h4>I love mangoes.</h4>
<h4>Hello, world!</h4>
<p>The red kite</p> -
9.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing</p> - 10.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) High Tech (c) Home Text (d) Hot Tags
-
11.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) bus.jpg (b) A happy dog (c) dog.jpg (d) moon.png -
12.🔍 One closing tag is missing. Which one?
<strong>Good morning!</strong>
<h1>My pets
<i>Cricket is fun.</i> (a) </strong> (b) </i> (c) </h1> (d) </b> -
13.🔗 Which words do you click on?
<a href="quiz.html">Contact us</a> (a) Contact us (b) Visit the site (c) href (d) quiz.html -
14.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="100"> (a) Birthday cake (b) moon.png (c) dog.jpg (d) cake.jpg - 15.📄 Can HTML on its own count button clicks? (a) Yes (b) No
-
16.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Sky is blue<br>Rivers flow<br>Stars shine<br>Roses are red</p> -
17.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Match report</h1>
<p>Mars is red.</p>
</body>
</html> (a) Match report (b) Space Facts (c) body (d) Mars is red. - 18.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
- 19.Which of these is a closing tag? (a) <b> (b) <body> (c) </h1> (d) <h1>
-
20.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Grapes</li>
<li>Papaya</li>
</ul> - 21.🌐 Which one shows line numbers? (a) a web server (b) a code editor (c) a web browser
- 22.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
-
23.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Orange</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets -
24.📋 What number does the browser show next to “Grapes”?
<ol start="7">
<li>Banana</li>
<li>Jamun</li>
<li>Guava</li>
<li>Grapes</li>
<li>Orange</li>
<li>Mango</li>
</ol> - 25.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
-
26.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Good morning!</p> -->
<!-- <p>The red kite</p> -->
<p>Hello, world!</p> - 27.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 28.🏷️ Which is the closing tag for <u>? (a) <\u> (b) <u/> (c) <u> (d) </u>
- 29.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
- 30.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
- 31.Which of these goes in the body? (a) <h1> (b) <title> (c) <meta charset="utf-8"> (d) <style>
-
32.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p> -
33.🔗 Which words do you click on?
<a href="news.html">Visit the site</a> (a) Maths fun (b) Visit the site (c) news.html (d) href -
34.🔗 Where does this link open?
<a href="maths.html">Visit the site</a> (a) in the same tab (b) in a new tab - 35.🏷️ Which is the closing tag for <p>? (a) <\p> (b) <p/> (c) </p> (d) <p>
- 36.🏷️ Which is the closing tag for <b>? (a) <\b> (b) <b> (c) <b/> (d) </b>
- 37.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a alt="about.html">
-
38.🔗 Which words do you click on?
<a href="games.html">Play games</a> (a) href (b) Play games (c) About us (d) games.html -
39.📋 What number does the browser show next to “Grapes”?
<ol start="6">
<li>Litchi</li>
<li>Grapes</li>
<li>Mango</li>
<li>Orange</li>
<li>Banana</li>
<li>Papaya</li>
</ol> -
40.📋 What number does the browser show next to “Papaya”?
<ol start="3">
<li>Mango</li>
<li>Grapes</li>
<li>Papaya</li>
</ol>
Answer key
- bullets
- opens it in a new tab
- About us
- Maths fun
- 4
- An old fort
- 50
- 4
- 2
- HyperText
- dog.jpg
- </h1>
- Contact us
- cake.jpg
- No
- 5
- Match report
- False
- </h1>
- 3
- a code editor
- in the head
- bullets
- 10
- to leave notes
- 2
- No
- </u>
- No
- <ul>
- <h1>
- 2
- Visit the site
- in the same tab
- </p>
- </b>
- <a href="about.html">
- Play games
- 7
- 5
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids