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 heading shows the BIGGEST text: <h5>, <h1>, <h6> or <h2>? (a) <h1> (b) <h2> (c) <h6> (d) <h5>
- 2.Which of these is an empty tag? (a) <input> (b) <h1> (c) <p> (d) <ul>
- 3.True or false: in <img>, src names the picture file. (a) False (b) True
- 4.🏷️ Which is the closing tag for <em>? (a) <em/> (b) <\em> (c) <em> (d) </em>
- 5.True or false: in <img>, width describes the picture. (a) True (b) False
-
6.🔗 Where does this link open?
<a href="about.html">Art corner</a> (a) in the same tab (b) in a new tab - 7.🌐 Which one turns HTML into a page? (a) a code editor (b) a web server (c) a web browser
- 8.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
9.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Match report</h1>
<p>Try this poha.</p>
</body>
</html> (a) Art Gallery (b) Try this poha. (c) Match report (d) index.html - 10.Which of these is true of a web browser? (a) opens web pages for us (b) sends pages over the net (c) answers page requests (d) stores a website’s files
-
11.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h3>Fun facts</h3>
<h2>Good morning!</h2>
<h2>Rain today</h2>
<h2>Rain today</h2> -
12.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high<br>Birds sing<br>Stars shine</p> -
13.🔗 Which words do you click on?
<a href="news.html">Art corner</a> (a) Art corner (b) School news (c) href (d) news.html -
14.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) dog.jpg (b) The full moon (c) width (d) A happy dog - 15.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
- 16.True or false: HTML on its own can add pictures to a page. (a) False (b) True
-
17.🔗 Which words do you click on?
<a href="contact.html">Take the quiz</a> (a) contact.html (b) Take the quiz (c) href (d) Play games - 18.Which of these is true of a code editor? (a) turns HTML into a page (b) sends pages over the net (c) saves our .html files (d) has an address bar
- 19.True or false: a web server is where we type code. (a) False (b) True
-
20.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) My Hobbies (b) Welcome! (c) body (d) I like to read. - 21.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) width (d) src
- 22.True or false: <b> has a closing tag. (a) False (b) True
- 23.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h4> or <h5>? (a) <h4> (b) <h6> (c) <h3> (d) <h5>
- 24.💬 Why do coders write comments? (a) to leave notes (b) to add colour (c) to make links (d) to show pictures
-
25.🔍 One closing tag is missing. Which one?
<i>Fun facts</i>
<h2>Hello, world!
<h3>I love mangoes.</h3> (a) </i> (b) </em> (c) </h3> (d) </h2> - 26.Which of these is an opening tag? (a) </title> (b) </b> (c) </p> (d) <li>
-
27.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) width (b) A red kite (c) tiger.jpg (d) A tiger asleep - 28.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h5>? (a) <h2> (b) <h3> (c) <h5> (d) <h6>
- 29.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) <!DOCTYPE html> (c) <head> (d) <body>
- 30.True or false: HTML on its own can make headings. (a) True (b) False
-
31.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="50"> (a) tiger.jpg (b) Our school bus (c) fort.jpg (d) bus.jpg - 32.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <hr> (d) <ul>
-
33.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Planets</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Planets (b) Here is my best one. (c) index.html (d) Class 7 Blog - 34.True or false: HTML on its own can count button clicks. (a) False (b) True
- 35.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </html>
-
36.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>My pets</p>
<p>Hello, world!</p>
<p>Good morning!</p> (a) Good morning! (b) My pets (c) Hello, world! (d) Our school trip - 37.💬 Does the browser show comments on the page? (a) Yes (b) No
- 38.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
- 39.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h6>? (a) <h4> (b) <h1> (c) <h5> (d) <h6>
-
40.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Match report</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Class 7 Blog (b) We won by 5 runs. (c) body (d) Match report
Answer key
- <h1>
- <input>
- True
- </em>
- False
- in the same tab
- a web browser
- has a closing tag
- Art Gallery
- opens web pages for us
- 5
- 4
- Art corner
- A happy dog
- -->
- True
- Take the quiz
- saves our .html files
- False
- Welcome!
- src
- True
- <h3>
- to leave notes
- </h2>
- <li>
- A tiger asleep
- <h2>
- <!DOCTYPE html>
- True
- bus.jpg
- <ul>
- Class 7 Blog
- False
- <!DOCTYPE html>
- Our school trip
- No
- on the browser tab
- <h6>
- Match report
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids