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.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 2.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h2> or <h1>? (a) <h1> (b) <h2> (c) <h4> (d) <h6>
-
3.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Rain today</p> -->
<p>The red kite</p> -
4.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="50"> - 5.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
6.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Grapes</li>
</ul> (a) bullets (b) numbers - 7.True or false: HTML on its own cannot make a form. (a) True (b) False
- 8.True or false: a code editor is where we type code. (a) False (b) True
-
9.🔍 One closing tag is missing. Which one?
<u>Good morning!
<strong>Cricket is fun.</strong>
<em>My pets</em> (a) </h1> (b) </strong> (c) </u> (d) </em> -
10.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) Class 7 Blog (c) All about me (d) index.html -
11.🔍 One closing tag is missing. Which one?
<strong>Fun facts
<b>My pets</b>
<h2>My best friend</h2> (a) </h3> (b) </h2> (c) </b> (d) </strong> - 12.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) </html>
-
13.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Kites fly high</p> -
14.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p>
<p>Our school trip</p> - 15.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
-
16.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>My pets</h2>
<h2>My best friend</h2>
<h2>I love mangoes.</h2> -
17.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>The red kite</p> -->
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p>
<p>Cricket is fun.</p> -
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) dog.jpg (b) The full moon (c) width (d) A happy dog - 19.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
-
20.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Our school trip</p>
<!-- <p>I love mangoes.</p> --> - 21.True or false: <title> goes in the head. (a) False (b) True
-
22.🔗 Which words do you click on?
<a href="contact.html">Take the quiz</a> (a) Take the quiz (b) contact.html (c) Play games (d) href - 23.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 24.🔍 Which is the odd one out? (a) turns HTML into a page (b) opens web pages for us (c) saves our .html files (d) shows pages from the web
- 25.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <\strong> (c) <strong/> (d) </strong>
- 26.🧱 HTML gives a web page its ___. (a) sound (b) structure (c) speed (d) colours
- 27.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h5> (d) <h1>
-
28.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="350"> (a) cake.jpg (b) map.png (c) Map of India (d) dog.jpg - 29.True or false: <title> goes in the body. (a) True (b) False
-
30.🔍 One closing tag is missing. Which one?
<h2>Cricket is fun.
<strong>Fun facts</strong>
<small>Good morning!</small> (a) </small> (b) </em> (c) </h2> (d) </strong> - 31.True or false: <meta> has a closing tag. (a) False (b) True
-
32.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Rain today</p>
<!-- <p>My pets</p> --> - 33.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
-
34.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="250"> - 35.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
- 36.True or false: a web server sends pages over the net. (a) True (b) False
-
37.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="100"> (a) Our school bus (b) The full moon (c) moon.png (d) width - 38.Which of these has a closing tag? (a) <meta> (b) <hr> (c) <input> (d) <li>
-
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="400"> (a) moon.png (b) width (c) Our school bus (d) The full moon - 40.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) width (d) height
Answer key
- an opening tag
- <h6>
- 1
- 50
- has a closing tag
- bullets
- False
- True
- </u>
- Class 7 Blog
- </strong>
- <!DOCTYPE html>
- 2
- 2
- False
- 1
- 2
- A happy dog
- <ol>
- 1
- True
- Take the quiz
- a closing tag
- saves our .html files
- </strong>
- structure
- <h5>
- map.png
- False
- </h2>
- False
- 1
- to describe the image
- 250
- <ul>
- True
- The full moon
- <li>
- The full moon
- alt
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids