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 is the odd one out? (a) shows line numbers (b) saves our .html files (c) has an address bar (d) colours code to help us
-
2.🔗 Which words do you click on?
<a href="art.html">Play games</a> (a) href (b) art.html (c) Play games (d) About us -
3.🔗 Where does this link open?
<a href="contact.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab - 4.Which of these is true of a code editor? (a) turns HTML into a page (b) hosts websites online (c) stores a website’s files (d) shows line numbers
- 5.True or false: in <img>, width sets how wide it is. (a) True (b) False
-
6.🔗 Which words do you click on?
<a href="contact.html">School news</a> (a) href (b) School news (c) contact.html (d) Take the quiz -
7.📋 What number does the browser show next to “Orange”?
<ol>
<li>Banana</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Orange</li>
</ol> - 8.Which of these is an opening tag? (a) <li> (b) </b> (c) </body> (d) </li>
- 9.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) </h2> (d) <h2/>
-
10.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Mango</li>
<li>Papaya</li>
</ul> -
11.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Banana</li>
<li>Litchi</li>
<li>Jamun</li>
</ul> -
12.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>The red kite</h2>
<p>Rain today</p>
<h2>Rain today</h2>
<h2>My pets</h2> - 13.Which of these is a closing tag? (a) <h1> (b) </p> (c) <title> (d) <li>
- 14.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
-
15.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Grapes</li>
</ul> (a) numbers (b) bullets -
16.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) About us (b) href (c) contact.html (d) Play games - 17.📄 Which part holds everything you see on the page? (a) the doctype (b) the head (c) the body (d) the title
-
18.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) body (b) Riya’s Recipes (c) Easy snacks (d) I like to read. -
19.🔗 Which words do you click on?
<a href="quiz.html">Contact us</a> (a) href (b) Contact us (c) Visit the site (d) quiz.html - 20.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
- 21.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
-
22.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>Hello, world!</h4>
<p>I love mangoes.</p>
<h2>Fun facts</h2>
<h3>I love mangoes.</h3> - 23.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 24.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
-
25.🔍 One closing tag is missing. Which one?
<p>Hello, world!</p>
<b>My best friend</b>
<h3>My pets (a) </b> (b) </p> (c) </h3> (d) </u> - 26.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <img> (d) <a>
-
27.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p>
<p>Our school trip</p> -
28.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="200"> -
29.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p>
<p>The red kite</p>
<!-- <p>Rain today</p> --> - 30.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
-
31.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) index.html (c) All about me (d) Space Facts -
32.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="100"> (a) kite.png (b) map.png (c) A red kite (d) cake.jpg - 33.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Mouse (d) Machine
- 34.📄 Can HTML on its own keep a high score? (a) No (b) Yes
-
35.🔗 Which address opens when you click this link?
<a href="contact.html">Visit the site</a> (a) maths.html (b) Visit the site (c) https://example.com (d) contact.html -
36.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>My pets</p>
<p>Good morning!</p> (a) My pets (b) Fun facts (c) Good morning! -
37.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Fun facts</p>
<!-- <p>My pets</p> -->
<p>Our school trip</p> (a) Cricket is fun. (b) Our school trip (c) Fun facts (d) My pets -
38.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>Good morning!</h2>
<h2>Rain today</h2>
<h2>My pets</h2>
<h2>Good morning!</h2>
<p>Rain today</p> - 39.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) width (d) alt
- 40.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
Answer key
- has an address bar
- Play games
- in a new tab
- shows line numbers
- True
- School news
- 4
- <li>
- </h2>
- 3
- 4
- 2
- </p>
- a web browser
- bullets
- Play games
- the body
- Easy snacks
- Contact us
- <ol>
- in the head
- 4
- a closing tag
- Yes
- </h3>
- <a>
- 2
- 200
- 2
- <ol>
- Space Facts
- kite.png
- Markup
- No
- contact.html
- Fun facts
- My pets
- 2
- alt
- has a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids