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.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </html>
- 2.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <head> (d) <!DOCTYPE html>
- 3.🌍 Which program shows a web page to us? (a) a calculator (b) a web browser (c) a music player (d) a paint program
- 4.Which of these is an empty tag? (a) <input> (b) <title> (c) <h1> (d) <li>
- 5.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 6.True or false: a web browser answers page requests. (a) False (b) True
-
7.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Match report</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) Art Gallery (c) Match report (d) body - 8.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 9.True or false: HTML on its own cannot run a game loop. (a) False (b) True
-
10.🔗 Where does this link open?
<a href="games.html">Play games</a> (a) in a new tab (b) in the same tab -
11.🔗 Which words do you click on?
<a href="about.html">School news</a> (a) href (b) Take the quiz (c) School news (d) about.html - 12.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <hr> (d) <br>
- 13.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
- 14.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
- 15.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h2> or <h1>? (a) <h3> (b) <h1> (c) <h5> (d) <h2>
-
16.🔗 Which address opens when you click this link?
<a href="contact.html">Maths fun</a> (a) contact.html (b) maths.html (c) https://example.com (d) Maths fun -
17.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> -->
<p>Our school trip</p> (a) Cricket is fun. (b) The red kite (c) I love mangoes. (d) Our school trip -
18.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Planets</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Art Gallery (b) We won by 5 runs. (c) Planets (d) body - 19.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
- 20.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h5>? (a) <h3> (b) <h2> (c) <h5> (d) <h6>
-
21.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) Art Gallery (b) All about me (c) Mars is red. (d) body - 22.True or false: a code editor colours code to help us. (a) True (b) False
-
23.🔗 Which address opens when you click this link?
<a href="about.html">Maths fun</a> (a) https://example.com (b) contact.html (c) about.html (d) Maths fun - 24.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 25.Which of these is a closing tag? (a) </h1> (b) <h1> (c) <title> (d) <li>
- 26.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 27.Which of these goes in the head? (a) <h1> (b) <title> (c) <table> (d) <a>
-
28.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) A tiger asleep (b) tiger.jpg (c) A red kite (d) width -
29.🔍 One closing tag is missing. Which one?
<b>I love mangoes.</b>
<strong>Our school trip
<em>Fun facts</em> (a) </em> (b) </strong> (c) </b> (d) </h1> -
30.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Guava</li>
</ul> - 31.🔗 Which attribute holds the address of a link? (a) id (b) href (c) alt (d) src
-
32.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing<br>Rivers flow<br>Kites fly high<br>Sky is blue</p> -
33.🔗 Which words do you click on?
<a href="games.html">Art corner</a> (a) href (b) School news (c) Art corner (d) games.html - 34.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to add colour (d) to show pictures
- 35.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 36.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as 5 spaces (d) as a new line
- 37.🔍 Which is the odd one out? (a) shows pages from the web (b) shows line numbers (c) is where we type code (d) saves our .html files
- 38.True or false: <img> goes in the body. (a) True (b) False
- 39.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
- 40.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) sends pages over the net (d) shows line numbers
Answer key
- <!DOCTYPE html>
- <!DOCTYPE html>
- a web browser
- <input>
- a closing tag
- False
- Match report
- a closing tag
- True
- in the same tab
- School news
- <ol>
- a web server
- True
- <h1>
- contact.html
- Cricket is fun.
- Planets
- -->
- <h6>
- All about me
- True
- about.html
- an empty tag
- </h1>
- in the head
- <title>
- A tiger asleep
- </strong>
- 2
- href
- 5
- Art corner
- to leave notes
- Yes
- as one space
- shows pages from the web
- True
- False
- sends pages over the net
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids