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.🔗 Where does this link open?
<a href="games.html">Take the quiz</a> (a) in a new tab (b) in the same tab - 2.Which of these goes in the head? (a) <h1> (b) <table> (c) <meta charset="utf-8"> (d) <ul>
-
3.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="100"> - 4.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h2> or <h6>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
- 5.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h2> or <h1>? (a) <h6> (b) <h2> (c) <h1> (d) <h4>
- 6.True or false: <ul> lists things in any order. (a) True (b) False
- 7.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h6>? (a) <h1> (b) <h6> (c) <h3> (d) <h5>
- 8.🏷️ Which is the closing tag for <p>? (a) <p/> (b) </p> (c) <p> (d) <\p>
- 9.🔢 In a basic web page file, which comes first: “<html>” or “<!DOCTYPE html>”? (a) <html> (b) <!DOCTYPE html>
-
10.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="350"> (a) map.png (b) kite.png (c) A red kite (d) cake.jpg -
11.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) Planets (c) index.html (d) Cricket Club - 12.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
-
13.🔗 Where does this link open?
<a href="quiz.html">Visit the site</a> (a) in the same tab (b) in a new tab -
14.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Birds sing<br>Sky is blue<br>Kites fly high</p> -
15.🔍 One closing tag is missing. Which one?
<em>Fun facts
<small>Rain today</small>
<b>I love mangoes.</b> (a) </b> (b) </small> (c) </em> (d) </h2> - 16.🏷️ Which is the closing tag for <b>? (a) <\b> (b) <b> (c) <b/> (d) </b>
- 17.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 18.🔢 In a basic web page file, which comes first: “<body>” or “</body>”? (a) <body> (b) </body>
- 19.📄 Can HTML on its own make links to pages? (a) Yes (b) No
- 20.🧱 HTML gives a web page its ___. (a) colours (b) speed (c) sound (d) structure
- 21.True or false: <b> has a closing tag. (a) False (b) True
- 22.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 23.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) alt (d) src
- 24.📄 Can HTML on its own keep a high score? (a) Yes (b) No
- 25.🔗 Which attribute holds the address of a link? (a) src (b) id (c) href (d) alt
-
26.🔍 Which line is missing its closing tag?
line 1: <h1>Rain today
line 2: <small>Fun facts</small>
line 3: <u>The red kite</u> (a) line 3 (b) line 2 (c) line 1 -
27.🔍 Which line is missing its closing tag?
line 1: <strong>Cricket is fun.
line 2: <h1>I love mangoes.</h1>
line 3: <small>My pets</small> (a) line 1 (b) line 2 (c) line 3 -
28.🔍 Which line is missing its closing tag?
line 1: <h1>Good morning!
line 2: <h2>Hello, world!</h2>
line 3: <strong>My best friend</strong> (a) line 3 (b) line 2 (c) line 1 - 29.📝 What does <hr> draw? (a) a link (b) a table (c) a picture (d) a line across the page
- 30.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
- 31.Which of these goes in the head? (a) <h1> (b) <img> (c) <title> (d) <ul>
-
32.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red</p> -
33.🔗 Which words do you click on?
<a href="contact.html">About us</a> (a) contact.html (b) href (c) Contact us (d) About us - 34.True or false: <link rel="stylesheet"> goes in the head. (a) True (b) False
- 35.Which of these is a closing tag? (a) <title> (b) </b> (c) <b> (d) <li>
- 36.True or false: <title> goes in the body. (a) False (b) True
- 37.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 6 (d) 3
-
38.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) A happy dog (b) width (c) dog.jpg (d) The full moon -
39.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Rain today</p>
<p>My best friend</p>
<p>I love mangoes.</p>
<p>Hello, world!</p>
<h2>Fun facts</h2> - 40.🔍 Which is the odd one out? (a) saves our .html files (b) sends pages over the net (c) shows line numbers (d) colours code to help us
Answer key
- in the same tab
- <meta charset="utf-8">
- 100
- <h1>
- <h1>
- True
- <h1>
- </p>
- <!DOCTYPE html>
- kite.png
- Cricket Club
- in the body
- in the same tab
- 4
- </em>
- </b>
- has a closing tag
- <body>
- Yes
- structure
- True
- has a closing tag
- alt
- No
- href
- line 1
- line 1
- line 1
- a line across the page
- -->
- <title>
- 2
- About us
- True
- </b>
- False
- 1
- A happy dog
- 5
- sends pages over the net
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids