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 anyone read your comments by viewing the page source? (a) No (b) Yes
-
2.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Mango</li>
<li>Grapes</li>
<li>Jamun</li>
</ul> -
3.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) Riya’s Recipes (c) body (d) All about me - 4.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
- 5.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
-
6.🔗 Which words do you click on?
<a href="news.html">Art corner</a> (a) School news (b) href (c) news.html (d) Art corner - 7.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to describe the image (d) to load it faster
-
8.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>My pets</p>
<p>Good morning!</p>
<p>My pets</p> -
9.📋 What number does the browser show next to “Orange”?
<ol>
<li>Litchi</li>
<li>Orange</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Banana</li>
</ol> - 10.Which of these goes in the head? (a) <img> (b) <a> (c) <title> (d) <table>
-
11.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>Cricket is fun.</h2>
<p>I love mangoes.</p>
<p>Hello, world!</p>
<p>Our school trip</p> -
12.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>My pets</p> -->
<p>I love mangoes.</p> (a) Rain today (b) I love mangoes. (c) My pets - 13.🌐 Which one saves our .html files? (a) a code editor (b) a web browser (c) a web server
-
14.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Grapes</li>
</ol> -
15.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing</p> - 16.💬 How does an HTML comment end? (a) --> (b) // (c) */ (d) >>
- 17.True or false: a web browser sends pages over the net. (a) False (b) True
- 18.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) sends pages over the net (d) saves our .html files
-
19.📋 What number does the browser show next to “Guava”?
<ol start="5">
<li>Litchi</li>
<li>Guava</li>
<li>Grapes</li>
</ol> -
20.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<p>The red kite</p> (a) Rain today (b) The red kite (c) Hello, world! (d) Our school trip - 21.🖼️ Which attribute of <img> describes the picture? (a) width (b) height (c) alt (d) src
-
22.🔍 Which line is missing its closing tag?
line 1: <i>Fun facts</i>
line 2: <h2>The red kite</h2>
line 3: <h3>Our school trip (a) line 2 (b) line 3 (c) line 1 -
23.🔍 Which line is missing its closing tag?
line 1: <h2>Good morning!</h2>
line 2: <i>Hello, world!</i>
line 3: <h1>Rain today (a) line 1 (b) line 2 (c) line 3 -
24.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>My drawings</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) My drawings (b) We won by 5 runs. (c) body (d) Art Gallery - 25.Which of these goes in the body? (a) <table> (b) <meta charset="utf-8"> (c) <title> (d) <style>
- 26.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 27.📄 Can HTML on its own run a game loop? (a) No (b) Yes
- 28.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
- 29.True or false: <li> lists things in any order. (a) False (b) True
- 30.Which of these is a closing tag? (a) <p> (b) <body> (c) <h1> (d) </p>
-
31.🔗 Where does this link open?
<a href="about.html">Visit the site</a> (a) in the same tab (b) in a new tab -
32.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>My pets</h2>
<p>My best friend</p>
<p>My pets</p>
<h2>Our school trip</h2>
<p>My pets</p> - 33.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
- 34.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
-
35.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red</p> - 36.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 37.True or false: <img> is an empty tag. (a) True (b) False
-
38.🔗 Where does this link open?
<a href="games.html" target="_blank">About us</a> (a) in a new tab (b) in the same tab - 39.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h2> or <h4>? (a) <h5> (b) <h2> (c) <h4> (d) <h3>
-
40.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Fun facts</p> -->
<p>Rain today</p>
<p>My pets</p>
<p>The red kite</p>
Answer key
- Yes
- 4
- All about me
- <ul>
- Yes
- Art corner
- to describe the image
- 1
- 2
- <title>
- 4
- My pets
- a code editor
- 2
- 2
- -->
- False
- sends pages over the net
- 6
- Hello, world!
- alt
- line 3
- line 3
- My drawings
- <table>
- No
- No
- a web server
- False
- </p>
- in the same tab
- 4
- 1
- href
- 2
- Yes
- True
- in a new tab
- <h2>
- 4
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids