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 SMALLEST text: <h4>, <h6>, <h5> or <h3>? (a) <h5> (b) <h6> (c) <h3> (d) <h4>
- 2.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 3.🔢 In a basic web page file, which comes first: “</body>” or “</html>”? (a) </body> (b) </html>
- 4.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
- 5.💬 Does the browser show comments on the page? (a) Yes (b) No
-
6.🔗 Which address opens when you click this link?
<a href="quiz.html">Art corner</a> (a) games.html (b) quiz.html (c) about.html (d) Art corner - 7.True or false: <li> is an ordered list. (a) True (b) False
-
8.🔗 Which words do you click on?
<a href="https://example.com">Take the quiz</a> (a) Play games (b) Take the quiz (c) https://example.com (d) href -
9.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="200"> (a) width (b) map.png (c) Map of India (d) Birthday cake -
10.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) fort.jpg (b) bus.jpg (c) Our school bus (d) tiger.jpg - 11.Which of these is an empty tag? (a) <title> (b) <b> (c) <ul> (d) <hr>
-
12.🔗 Where does this link open?
<a href="about.html">Visit the site</a> (a) in the same tab (b) in a new tab - 13.Which of these is an opening tag? (a) <title> (b) </li> (c) </title> (d) </b>
- 14.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <link rel="stylesheet"> (d) <h1>
- 15.🔢 In a basic web page file, which comes LAST? (a) <body> (b) </body> (c) <!DOCTYPE html> (d) </html>
- 16.🌐 Which one stores a website’s files? (a) a web server (b) a code editor (c) a web browser
- 17.🔍 Which is the odd one out? (a) answers page requests (b) colours code to help us (c) is where we type code (d) saves our .html files
- 18.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h2>? (a) <h6> (b) <h5> (c) <h3> (d) <h2>
-
19.📄 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) Match report (b) Art Gallery (c) Try this poha. (d) index.html - 20.True or false: HTML on its own cannot make tables. (a) True (b) False
- 21.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 22.🔗 Which attribute holds the address of a link? (a) src (b) id (c) href (d) alt
- 23.True or false: <ul> lists things in any order. (a) True (b) False
- 24.📝 What does <hr> draw? (a) a link (b) a picture (c) a line across the page (d) a table
- 25.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a href="about.html"> (d) <a alt="about.html">
- 26.📝 What does <p> make? (a) a picture (b) a paragraph (c) a link (d) a table
- 27.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 28.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h4> or <h6>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
- 29.Which of these goes in the body? (a) <style> (b) <title> (c) <img> (d) <meta charset="utf-8">
- 30.True or false: <p> goes in the head. (a) False (b) True
-
31.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="150"> - 32.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) </html> (b) <!DOCTYPE html>
- 33.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 34.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
-
35.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="50"> -
36.🔗 Where does this link open?
<a href="about.html">Play games</a> (a) in the same tab (b) in a new tab - 37.True or false: <b> is an empty tag. (a) True (b) False
-
38.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Match report</h1>
<p>Try this poha.</p>
</body>
</html> (a) Cricket Club (b) Try this poha. (c) index.html (d) Match report -
39.🔗 Which words do you click on?
<a href="contact.html">About us</a> (a) Contact us (b) href (c) contact.html (d) About us - 40.🖼️ Which attribute of <img> names the picture file? (a) src (b) width (c) height (d) alt
Answer key
- <h6>
- Yes
- </body>
- a code editor
- No
- quiz.html
- False
- Take the quiz
- Map of India
- bus.jpg
- <hr>
- in the same tab
- <title>
- <h1>
- </html>
- a web server
- answers page requests
- <h2>
- Art Gallery
- False
- has a closing tag
- href
- True
- a line across the page
- <a href="about.html">
- a paragraph
- an opening tag
- <h1>
- <img>
- False
- 150
- <!DOCTYPE html>
- an empty tag
- <li>
- 50
- in the same tab
- False
- Cricket Club
- About us
- src
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids