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.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="50"> (a) tiger.jpg (b) bus.jpg (c) fort.jpg (d) Our school bus -
2.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) Class 7 Blog (b) body (c) All about me (d) Try this poha. - 3.📝 What does <hr> draw? (a) a link (b) a picture (c) a line across the page (d) a table
-
4.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p> - 5.True or false: <ul> shows bullet points. (a) False (b) True
- 6.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
-
7.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>Cricket is fun.</h2>
<h2>I love mangoes.</h2>
<p>I love mangoes.</p> - 8.💬 How does an HTML comment end? (a) // (b) */ (c) >> (d) -->
- 9.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 10.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <img> (d) <p>
- 11.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h5> or <h1>? (a) <h5> (b) <h3> (c) <h6> (d) <h1>
- 12.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 13.Which of these is true of a web browser? (a) sends pages over the net (b) opens web pages for us (c) is where we type code (d) colours code to help us
- 14.🔍 Which is the odd one out? (a) shows line numbers (b) hosts websites online (c) sends pages over the net (d) stores a website’s files
-
15.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) Art Gallery (b) body (c) Easy snacks (d) Try this poha. - 16.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 17.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 18.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
-
19.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Fun facts</p>
<p>The red kite</p> -
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) A tiger asleep (b) tiger.jpg (c) width (d) A red kite - 21.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h6>? (a) <h6> (b) <h4> (c) <h3> (d) <h1>
- 22.True or false: <ol> shows bullet points. (a) True (b) False
- 23.True or false: <meta> is an empty tag. (a) True (b) False
- 24.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h2> (d) <h5>
-
25.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="350"> -
26.🔗 Which address opens when you click this link?
<a href="quiz.html">About us</a> (a) quiz.html (b) games.html (c) About us (d) about.html -
27.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Hello, world!</p>
<!-- <p>My pets</p> --> (a) My pets (b) Good morning! (c) Hello, world! - 28.📄 Can HTML on its own make links to pages? (a) Yes (b) No
- 29.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
30.🔗 Which address opens when you click this link?
<a href="contact.html">Visit the site</a> (a) https://example.com (b) Visit the site (c) contact.html (d) maths.html - 31.True or false: <title> goes in the body. (a) False (b) True
- 32.Which of these goes in the head? (a) <h1> (b) <a> (c) <table> (d) <meta charset="utf-8">
- 33.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h3>? (a) <h3> (b) <h4> (c) <h1> (d) <h5>
- 34.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
- 35.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h5> or <h2>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
- 36.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 37.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) </h2> (c) <h2> (d) <h2/>
- 38.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <h6> (d) <p>
-
39.🔍 One closing tag is missing. Which one?
<b>I love mangoes.</b>
<em>Hello, world!</em>
<small>Fun facts (a) </small> (b) </p> (c) </em> (d) </b> - 40.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
Answer key
- bus.jpg
- All about me
- a line across the page
- 1
- True
- in the body
- 3
- -->
- Yes
- <a>
- <h6>
- an opening tag
- opens web pages for us
- shows line numbers
- Easy snacks
- has a closing tag
- Yes
- a slash /
- 2
- A tiger asleep
- <h6>
- False
- True
- <h2>
- 350
- quiz.html
- My pets
- Yes
- a closing tag
- contact.html
- False
- <meta charset="utf-8">
- <h5>
- <ul>
- <h5>
- True
- </h2>
- <h6>
- </small>
- a code editor
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids