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.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
-
2.🔍 Which line is missing its closing tag?
line 1: <h1>Hello, world!</h1>
line 2: <h2>Rain today
line 3: <p>Cricket is fun.</p> (a) line 1 (b) line 2 (c) line 3 -
3.📋 What number does the browser show next to “Jamun”?
<ol start="3">
<li>Litchi</li>
<li>Papaya</li>
<li>Orange</li>
<li>Jamun</li>
<li>Guava</li>
</ol> -
4.📋 What number does the browser show next to “Banana”?
<ol>
<li>Jamun</li>
<li>Banana</li>
<li>Orange</li>
<li>Papaya</li>
<li>Grapes</li>
</ol> -
5.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>My best friend</p>
<p>My pets</p> - 6.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
-
7.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Mango</li>
<li>Orange</li>
<li>Grapes</li>
<li>Litchi</li>
<li>Papaya</li>
</ol> -
8.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>The red kite</p>
<p>Good morning!</p> (a) Good morning! (b) Rain today (c) The red kite -
9.🔗 Which words do you click on?
<a href="art.html">Maths fun</a> (a) art.html (b) Maths fun (c) href (d) Art corner -
10.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="400"> -
11.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Papaya</li>
<li>Orange</li>
<li>Guava</li>
</ol> -
12.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Good morning!</p>
<h2>Rain today</h2> - 13.True or false: in <img>, alt shows if the image fails. (a) True (b) False
-
14.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="50"> (a) map.png (b) width (c) Map of India (d) Birthday cake -
15.🔠 How many headings are in this code?
<h1>My pets</h1>
<h2>Good morning!</h2>
<p>Our school trip</p>
<p>Rain today</p> - 16.True or false: <title> has a closing tag. (a) True (b) False
-
17.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p>
<p>Fun facts</p> (a) Good morning! (b) Fun facts (c) Cricket is fun. - 18.Which of these goes in the head? (a) <table> (b) <a> (c) <h1> (d) <meta charset="utf-8">
-
19.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Papaya</li>
<li>Mango</li>
</ul> (a) bullets (b) numbers - 20.True or false: HTML on its own can run a game loop. (a) True (b) False
-
21.🔗 Which words do you click on?
<a href="news.html">Contact us</a> (a) Contact us (b) href (c) news.html (d) Visit the site - 22.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h4> or <h1>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
- 23.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
- 24.True or false: in <img>, src tells which image to load. (a) False (b) True
-
25.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>I love mangoes.</p>
<h3>My best friend</h3> - 26.True or false: HTML on its own cannot keep a high score. (a) True (b) False
- 27.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 4 (d) 3
- 28.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
- 29.Which of these is a closing tag? (a) <body> (b) <h1> (c) <title> (d) </body>
- 30.True or false: <p> goes in the head. (a) True (b) False
- 31.Which of these is a closing tag? (a) <b> (b) <body> (c) </li> (d) <li>
-
32.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Planets</h1>
<p>Mars is red.</p>
</body>
</html> (a) Riya’s Recipes (b) index.html (c) Planets (d) Mars is red. - 33.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h6> or <h3>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
- 34.Which of these is an opening tag? (a) </li> (b) </b> (c) </h1> (d) <h1>
-
35.🔍 One closing tag is missing. Which one?
<em>My pets</em>
<i>Cricket is fun.
<p>Good morning!</p> (a) </h3> (b) </i> (c) </p> (d) </em> - 36.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
- 37.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h4> or <h2>? (a) <h1> (b) <h3> (c) <h2> (d) <h4>
- 38.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
-
39.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Banana</li>
</ul> - 40.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
Answer key
- in the head
- line 2
- 6
- 2
- 1
- <h1>
- 3
- Rain today
- Maths fun
- 400
- 4
- 2
- True
- Map of India
- 2
- True
- Good morning!
- <meta charset="utf-8">
- bullets
- False
- Contact us
- <h4>
- <a>
- True
- 2
- True
- 6
- <ul>
- </body>
- False
- </li>
- Riya’s Recipes
- <h2>
- <h1>
- </i>
- <!--
- <h4>
- <a href="about.html">
- 2
- opens it in a new tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids