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.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Our school trip</p>
<h4>I love mangoes.</h4> -
2.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>Hello, world!</p> -->
<p>Rain today</p> - 3.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
- 4.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
-
5.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="150"> -
6.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing<br>Stars shine<br>Rivers flow</p> -
7.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>Hello, world!</h2>
<p>Good morning!</p> - 8.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) element (d) editor
- 9.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h5>? (a) <h6> (b) <h1> (c) <h5> (d) <h2>
-
10.🔗 Which address opens when you click this link?
<a href="maths.html">Play games</a> (a) news.html (b) art.html (c) Play games (d) maths.html - 11.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
-
12.🔍 One closing tag is missing. Which one?
<h1>I love mangoes.
<h2>Rain today</h2>
<strong>Hello, world!</strong> (a) </h2> (b) </h3> (c) </h1> (d) </strong> - 13.True or false: <ul> goes in the head. (a) True (b) False
-
14.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Orange</li>
<li>Mango</li>
</ol> -
15.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p>
<p>Fun facts</p> (a) Good morning! (b) I love mangoes. (c) Fun facts -
16.🔍 One closing tag is missing. Which one?
<em>Rain today</em>
<h3>Hello, world!</h3>
<i>Fun facts (a) </em> (b) </h3> (c) </b> (d) </i> -
17.🔍 One closing tag is missing. Which one?
<u>Cricket is fun.</u>
<p>My best friend</p>
<em>Rain today (a) </em> (b) </u> (c) </p> (d) </h2> - 18.Which of these is a closing tag? (a) <body> (b) </p> (c) <h1> (d) <li>
-
19.📋 What number does the browser show next to “Mango”?
<ol>
<li>Guava</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Mango</li>
<li>Banana</li>
</ol> - 20.True or false: HTML on its own cannot pick a random number. (a) True (b) False
- 21.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) { (d) <
- 22.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
-
23.🔗 Which words do you click on?
<a href="about.html">About us</a> (a) Contact us (b) About us (c) about.html (d) href - 24.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
-
25.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) href (b) About us (c) https://example.com (d) Contact us - 26.🔍 Which is the odd one out? (a) shows pages from the web (b) colours code to help us (c) opens web pages for us (d) has an address bar
- 27.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the doctype (d) the body
- 28.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) height (c) width (d) src
- 29.True or false: <li> has a closing tag. (a) True (b) False
-
30.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Good morning!</p> -->
<!-- <p>I love mangoes.</p> --> -
31.📄 What does the browser tab show for 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) Here is my best one. (b) Class 7 Blog (c) My drawings (d) index.html - 32.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) src (d) id
- 33.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
- 34.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
- 35.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h2>? (a) <h4> (b) <h1> (c) <h2> (d) <h5>
-
36.🔍 Which line is missing its closing tag?
line 1: <i>Hello, world!
line 2: <b>Fun facts</b>
line 3: <strong>Cricket is fun.</strong> (a) line 3 (b) line 1 (c) line 2 - 37.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) width (d) height
- 38.True or false: HTML on its own can make tables. (a) False (b) True
- 39.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
- 40.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h2>? (a) <h2> (b) <h4> (c) <h3> (d) <h5>
Answer key
- 2
- 2
- in the head
- a web server
- 150
- 4
- 2
- element
- <h6>
- maths.html
- opens it in a new tab
- </h1>
- False
- 6
- I love mangoes.
- </i>
- </em>
- </p>
- 4
- True
- <
- in the body
- About us
- on the browser tab
- About us
- colours code to help us
- the body
- height
- True
- 1
- Class 7 Blog
- href
- <a>
- <ol>
- <h5>
- line 1
- alt
- True
- False
- <h2>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids