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.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
- 2.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
3.🔍 Which line is missing its closing tag?
line 1: <em>Our school trip</em>
line 2: <strong>Hello, world!</strong>
line 3: <h1>I love mangoes. (a) line 1 (b) line 3 (c) line 2 - 4.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
- 5.Which of these is true of a code editor? (a) shows pages from the web (b) sends pages over the net (c) answers page requests (d) saves our .html files
-
6.🔍 One closing tag is missing. Which one?
<h3>Fun facts</h3>
<b>Good morning!
<p>Our school trip</p> (a) </i> (b) </b> (c) </p> (d) </h3> - 7.Which of these goes in the head? (a) <title> (b) <a> (c) <table> (d) <p>
-
8.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<!-- <p>My best friend</p> --> (a) Fun facts (b) I love mangoes. (c) Cricket is fun. (d) My best friend - 9.💬 How does an HTML comment start? (a) // (b) # (c) <!-- (d) /*
-
10.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Papaya</li>
</ol> (a) numbers (b) bullets - 11.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a comment (d) a closing tag
-
12.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Fun facts</p>
<p>My best friend</p> - 13.🌐 Which one answers page requests? (a) a web browser (b) a code editor (c) a web server
-
14.🔗 Where does this link open?
<a href="contact.html" target="_blank">About us</a> (a) in a new tab (b) in the same tab -
15.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Planets</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) index.html (b) Space Facts (c) Planets (d) We won by 5 runs. - 16.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h6>? (a) <h6> (b) <h5> (c) <h3> (d) <h1>
-
17.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>I love mangoes.</p>
<p>Cricket is fun.</p> -
18.🔗 Which words do you click on?
<a href="games.html">Play games</a> (a) Play games (b) games.html (c) href (d) About us -
19.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>Good morning!</p> -->
<!-- <p>My pets</p> --> -
20.🔗 Which words do you click on?
<a href="https://example.com">Contact us</a> (a) https://example.com (b) href (c) Visit the site (d) Contact us -
21.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>Rain today</p> -->
<p>Good morning!</p>
<p>My pets</p> - 22.True or false: in <img>, alt names the picture file. (a) True (b) False
- 23.📄 Can HTML on its own keep a high score? (a) No (b) Yes
-
24.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing<br>Sky is blue<br>Roses are red<br>Rivers flow</p> - 25.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h2>? (a) <h4> (b) <h2> (c) <h5> (d) <h1>
- 26.True or false: a web server answers page requests. (a) True (b) False
- 27.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h3>? (a) <h4> (b) <h5> (c) <h3> (d) <h1>
-
28.🔗 Which words do you click on?
<a href="news.html">Art corner</a> (a) School news (b) Art corner (c) news.html (d) href -
29.🔗 Which address opens when you click this link?
<a href="art.html">Art corner</a> (a) news.html (b) art.html (c) quiz.html (d) Art corner -
30.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) index.html (b) We won by 5 runs. (c) Welcome! (d) Art Gallery -
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="150"> (a) Birthday cake (b) Map of India (c) width (d) map.png - 32.True or false: a web browser answers page requests. (a) False (b) True
- 33.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
-
34.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) About us (b) https://example.com (c) Play games (d) href -
35.📋 What number does the browser show next to “Litchi”?
<ol start="3">
<li>Papaya</li>
<li>Guava</li>
<li>Banana</li>
<li>Litchi</li>
<li>Grapes</li>
</ol> - 36.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
-
37.🔗 Where does this link open?
<a href="news.html">Art corner</a> (a) in the same tab (b) in a new tab - 38.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h4>? (a) <h6> (b) <h5> (c) <h4> (d) <h3>
- 39.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
- 40.💬 How does an HTML comment end? (a) */ (b) // (c) --> (d) >>
Answer key
- to leave notes
- No
- line 3
- <a>
- saves our .html files
- </b>
- <title>
- My best friend
- <!--
- numbers
- an attribute
- 3
- a web server
- in a new tab
- Space Facts
- <h1>
- 3
- Play games
- 1
- Contact us
- 3
- False
- No
- 5
- <h5>
- True
- <h5>
- Art corner
- art.html
- Art Gallery
- Map of India
- False
- <li>
- Play games
- 6
- a web browser
- in the same tab
- <h3>
- in the body
- -->
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids