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>Space Facts</title>
</head>
<body>
<h1>Planets</h1>
<p>Mars is red.</p>
</body>
</html> (a) Space Facts (b) Planets (c) index.html (d) Mars is red. -
2.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>My pets</h2>
<p>Our school trip</p>
<h2>Rain today</h2>
<p>Hello, world!</p> -
3.🔗 Where does this link open?
<a href="maths.html" target="_blank">School news</a> (a) in the same tab (b) in a new tab -
4.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h3>I love mangoes.</h3>
<p>Hello, world!</p> -
5.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow</p> -
6.🔗 Which words do you click on?
<a href="contact.html">School news</a> (a) contact.html (b) href (c) School news (d) Take the quiz - 7.Which of these is an empty tag? (a) <h1> (b) <img> (c) <p> (d) <li>
- 8.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <table> (c) <meta charset="utf-8"> (d) <title>
-
9.🔗 Which address opens when you click this link?
<a href="games.html">Play games</a> (a) about.html (b) contact.html (c) Play games (d) games.html - 10.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h2>
- 11.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) makes a list (d) starts a new line
-
12.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>My drawings</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) My drawings (b) Space Facts (c) Thanks for visiting. (d) index.html - 13.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) HyperText (c) Home Text (d) Hot Tags
- 14.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 15.Which of these is an opening tag? (a) </p> (b) </title> (c) <p> (d) </b>
-
16.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) About us (b) contact.html (c) href (d) Play games - 17.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <br> (d) <hr>
-
18.🔗 Where does this link open?
<a href="games.html">School news</a> (a) in a new tab (b) in the same tab -
19.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="350"> - 20.True or false: a web browser answers page requests. (a) True (b) False
-
21.🔍 Which line is missing its closing tag?
line 1: <h2>Hello, world!
line 2: <u>My pets</u>
line 3: <h3>I love mangoes.</h3> (a) line 2 (b) line 1 (c) line 3 - 22.🔢 In a basic web page file, which comes first: “<head>” or “</body>”? (a) </body> (b) <head>
- 23.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <style> (d) <p>
-
24.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) body (b) All about me (c) Space Facts (d) Mars is red. -
25.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="250"> (a) dog.jpg (b) cake.jpg (c) moon.png (d) Birthday cake -
26.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Orange</li>
<li>Papaya</li>
<li>Mango</li>
<li>Grapes</li>
<li>Litchi</li>
</ul> - 27.🏷️ Every HTML tag starts with which sign? (a) < (b) [ (c) ( (d) {
-
28.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="350"> - 29.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
- 30.True or false: in <img>, src tells which image to load. (a) False (b) True
-
31.🔗 Where does this link open?
<a href="news.html">Art corner</a> (a) in the same tab (b) in a new tab - 32.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a src="about.html"> (d) <a alt="about.html">
- 33.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
- 34.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
- 35.True or false: <b> has a closing tag. (a) False (b) True
- 36.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
-
37.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="150"> (a) Birthday cake (b) moon.png (c) cake.jpg (d) dog.jpg - 38.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 39.Which of these is an empty tag? (a) <meta> (b) <title> (c) <p> (d) <li>
- 40.Which of these has a closing tag? (a) <hr> (b) <input> (c) <img> (d) <p>
Answer key
- Space Facts
- 3
- in a new tab
- 2
- 2
- School news
- <img>
- <table>
- games.html
- <h1>
- starts a new line
- Space Facts
- HyperText
- a closing tag
- <p>
- Play games
- <ul>
- in the same tab
- 350
- False
- line 1
- <head>
- <p>
- All about me
- cake.jpg
- 6
- <
- 350
- 1
- True
- in the same tab
- <a href="about.html">
- a web browser
- <h1>
- True
- <ul>
- cake.jpg
- an empty tag
- <meta>
- <p>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids