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.📄 Can HTML on its own pick a random number? (a) No (b) Yes
-
2.🔗 Which words do you click on?
<a href="news.html">Take the quiz</a> (a) news.html (b) href (c) Take the quiz (d) Play games - 3.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <p> (d) <style>
-
4.🔗 Where does this link open?
<a href="games.html">Take the quiz</a> (a) in the same tab (b) in a new tab - 5.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
-
6.🔗 Which address opens when you click this link?
<a href="contact.html">Contact us</a> (a) contact.html (b) https://example.com (c) maths.html (d) Contact us - 7.🔢 In a basic web page file, which comes first: “</body>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </body>
- 8.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 9.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
- 10.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
- 11.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
- 12.True or false: <ul> is an empty tag. (a) True (b) False
- 13.💬 How does an HTML comment end? (a) // (b) >> (c) */ (d) -->
- 14.Which of these is true of a code editor? (a) turns HTML into a page (b) stores a website’s files (c) sends pages over the net (d) is where we type code
-
15.🔗 Which words do you click on?
<a href="games.html">Art corner</a> (a) School news (b) href (c) games.html (d) Art corner - 16.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 17.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
-
18.🔍 Which line is missing its closing tag?
line 1: <h2>Cricket is fun.</h2>
line 2: <b>My best friend</b>
line 3: <p>Our school trip (a) line 3 (b) line 1 (c) line 2 -
19.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="250"> (a) An old fort (b) width (c) bus.jpg (d) Our school bus -
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) width (b) dog.jpg (c) A happy dog (d) The full moon - 21.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
22.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) tiger.jpg (b) Our school bus (c) fort.jpg (d) bus.jpg - 23.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <a href="about.html"> (d) <link about.html>
- 24.True or false: a code editor saves our .html files. (a) True (b) False
-
25.🔍 Which line is missing its closing tag?
line 1: <strong>I love mangoes.
line 2: <h2>The red kite</h2>
line 3: <h3>My best friend</h3> (a) line 2 (b) line 3 (c) line 1 - 26.True or false: in <img>, alt is read by screen readers. (a) True (b) False
-
27.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Welcome! (b) body (c) We won by 5 runs. (d) Space Facts - 28.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) Home Text (c) Hot Tags (d) HyperText
-
29.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Orange</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Guava</li>
<li>Papaya</li>
</ol> - 30.True or false: HTML on its own can run a game loop. (a) True (b) False
- 31.True or false: <style> goes in the head. (a) True (b) False
- 32.True or false: in <img>, src names the picture file. (a) False (b) True
- 33.🏷️ Which is the closing tag for <small>? (a) <small/> (b) <small> (c) <\small> (d) </small>
-
34.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="350"> (a) kite.png (b) Map of India (c) A red kite (d) width - 35.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
36.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>My best friend</p>
<!-- <p>Good morning!</p> --> -
37.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="100"> - 38.True or false: <ul> shows bullet points. (a) False (b) True
- 39.Which of these is true of a web server? (a) is where we type code (b) turns HTML into a page (c) stores a website’s files (d) colours code to help us
-
40.🔗 Which address opens when you click this link?
<a href="about.html">Visit the site</a> (a) Visit the site (b) about.html (c) contact.html (d) https://example.com
Answer key
- No
- Take the quiz
- <p>
- in the same tab
- <a>
- contact.html
- <!DOCTYPE html>
- has a closing tag
- a code editor
- <ul>
- in the body
- False
- -->
- is where we type code
- Art corner
- an empty tag
- <!DOCTYPE html>
- line 3
- Our school bus
- A happy dog
- an empty tag
- bus.jpg
- <a href="about.html">
- True
- line 1
- True
- Welcome!
- HyperText
- 3
- False
- True
- True
- </small>
- A red kite
- No
- 2
- 100
- True
- stores a website’s files
- about.html
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids