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.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) Welcome! (b) index.html (c) Cricket Club (d) I like to read. -
2.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing<br>Roses are red</p> -
3.📋 What number does the browser show next to “Mango”?
<ol start="2">
<li>Guava</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Mango</li>
</ol> - 4.🏷️ Every HTML tag starts with which sign? (a) { (b) < (c) ( (d) [
- 5.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) hosts websites online (d) saves our .html files
-
6.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Class 7 Blog (b) My drawings (c) body (d) Here is my best one. - 7.🔢 In a basic web page file, which comes first: “</body>” or “</head>”? (a) </body> (b) </head>
-
8.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Guava</li>
<li>Mango</li>
</ul> -
9.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>My pets</h2>
<p>Rain today</p> -
10.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="300"> (a) Map of India (b) map.png (c) width (d) Birthday cake - 11.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 12.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
13.🔍 One closing tag is missing. Which one?
<em>I love mangoes.</em>
<b>Fun facts
<strong>Our school trip</strong> (a) </strong> (b) </em> (c) </b> (d) </h1> - 14.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <table> (c) <ul> (d) <h1>
- 15.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <h1> (d) <p>
-
16.🔍 Which line is missing its closing tag?
line 1: <b>Hello, world!</b>
line 2: <h3>Rain today</h3>
line 3: <h1>My best friend (a) line 3 (b) line 1 (c) line 2 -
17.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Planets</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) body (c) Riya’s Recipes (d) Planets -
18.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Our school trip</p>
<!-- <p>Rain today</p> --> (a) Rain today (b) My best friend (c) Our school trip - 19.📋 Which list suits a shopping list in any order? (a) <ul> (b) <ol> (c) <br> (d) <hr>
- 20.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h4> or <h3>? (a) <h6> (b) <h3> (c) <h4> (d) <h5>
-
21.🔗 Which address opens when you click this link?
<a href="maths.html">School news</a> (a) maths.html (b) School news (c) news.html (d) art.html - 22.True or false: <li> is one item of a list. (a) True (b) False
-
23.🔗 Which address opens when you click this link?
<a href="contact.html">School news</a> (a) maths.html (b) contact.html (c) https://example.com (d) School news - 24.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h4> or <h2>? (a) <h2> (b) <h4> (c) <h1> (d) <h3>
-
25.📋 What number does the browser show next to “Banana”?
<ol start="8">
<li>Orange</li>
<li>Banana</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Guava</li>
</ol> - 26.True or false: <ol> is an ordered list. (a) True (b) False
- 27.🔍 Which is the odd one out? (a) hosts websites online (b) stores a website’s files (c) sends pages over the net (d) saves our .html files
-
28.🔍 Which line is missing its closing tag?
line 1: <h1>I love mangoes.
line 2: <h3>Our school trip</h3>
line 3: <em>Good morning!</em> (a) line 2 (b) line 1 (c) line 3 - 29.True or false: a web server turns HTML into a page. (a) False (b) True
-
30.🔍 One closing tag is missing. Which one?
<h3>Cricket is fun.</h3>
<u>I love mangoes.
<h1>My best friend</h1> (a) </u> (b) </h2> (c) </h3> (d) </h1> -
31.🔍 Which line is missing its closing tag?
line 1: <h1>My pets</h1>
line 2: <em>Rain today</em>
line 3: <b>My best friend (a) line 2 (b) line 1 (c) line 3 - 32.True or false: <ol> is an unordered list. (a) False (b) True
- 33.True or false: in <img>, alt names the picture file. (a) True (b) False
- 34.Which of these goes in the head? (a) <h1> (b) <p> (c) <ul> (d) <title>
- 35.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
-
36.🖼️ 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) A tiger asleep (c) An old fort (d) width -
37.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Orange</li>
<li>Guava</li>
<li>Grapes</li>
</ol> - 38.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
39.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Rain today</p>
<h2>I love mangoes.</h2>
<h3>I love mangoes.</h3> -
40.🔗 Which words do you click on?
<a href="https://example.com">Maths fun</a> (a) Art corner (b) href (c) Maths fun (d) https://example.com
Answer key
- Cricket Club
- 3
- 7
- <
- hosts websites online
- My drawings
- </head>
- 3
- 2
- Map of India
- an opening tag
- a closing tag
- </b>
- <meta charset="utf-8">
- <h1>
- line 3
- Planets
- Rain today
- <ul>
- <h6>
- maths.html
- True
- contact.html
- <h1>
- 9
- True
- saves our .html files
- line 1
- False
- </u>
- line 3
- False
- False
- <title>
- <a href="about.html">
- An old fort
- 4
- No
- 3
- Maths fun
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids