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.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Planets</h1>
<p>Mars is red.</p>
</body>
</html> (a) index.html (b) Planets (c) Mars is red. (d) Riya’s Recipes -
2.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="350"> (a) cake.jpg (b) moon.png (c) dog.jpg (d) Birthday cake - 3.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h4> or <h1>? (a) <h2> (b) <h6> (c) <h4> (d) <h1>
- 4.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h6> or <h1>? (a) <h3> (b) <h5> (c) <h1> (d) <h6>
- 5.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
-
6.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Litchi</li>
<li>Banana</li>
<li>Jamun</li>
</ul> - 7.🔍 Which is the odd one out? (a) stores a website’s files (b) shows pages from the web (c) turns HTML into a page (d) has an address bar
-
8.🔗 Which words do you click on?
<a href="maths.html">About us</a> (a) href (b) Contact us (c) maths.html (d) About us -
9.🔍 One closing tag is missing. Which one?
<p>My pets</p>
<h2>I love mangoes.</h2>
<b>Good morning! (a) </em> (b) </h2> (c) </b> (d) </p> - 10.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 6 (d) 10
- 11.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
- 12.Which of these has a closing tag? (a) <hr> (b) <br> (c) <h1> (d) <input>
- 13.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) <\strong> (c) </strong> (d) <strong>
- 14.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to describe the image (d) to make it bigger
-
15.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Good morning!</p> -->
<!-- <p>Rain today</p> -->
<p>Our school trip</p>
<p>My best friend</p> - 16.True or false: a web server answers page requests. (a) True (b) False
- 17.🔢 In a basic web page file, which comes first: “</html>” or “<body>”? (a) <body> (b) </html>
- 18.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
19.🔗 Which words do you click on?
<a href="about.html">Contact us</a> (a) Visit the site (b) href (c) about.html (d) Contact us - 20.📋 Which list suits a shopping list in any order? (a) <br> (b) <ul> (c) <ol> (d) <hr>
- 21.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 3 (d) 4
-
22.🔍 Which line is missing its closing tag?
line 1: <h3>Fun facts
line 2: <small>I love mangoes.</small>
line 3: <b>Cricket is fun.</b> (a) line 2 (b) line 3 (c) line 1 - 23.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
-
24.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p> -
25.🔗 Which words do you click on?
<a href="https://example.com">Contact us</a> (a) https://example.com (b) href (c) Contact us (d) Visit the site -
26.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Papaya</li>
</ul> (a) numbers (b) bullets - 27.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the doctype (d) the title
- 28.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Machine (c) Mouse (d) Modern
-
29.🔍 Which line is missing its closing tag?
line 1: <strong>The red kite
line 2: <h2>Rain today</h2>
line 3: <i>My pets</i> (a) line 2 (b) line 1 (c) line 3 - 30.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
-
31.🔗 Where does this link open?
<a href="news.html">Art corner</a> (a) in the same tab (b) in a new tab - 32.True or false: a web server sends pages over the net. (a) False (b) True
-
33.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Planets</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) body (b) Planets (c) My Hobbies (d) Thanks for visiting. - 34.True or false: HTML on its own can make headings. (a) False (b) True
-
35.🔗 Which address opens when you click this link?
<a href="contact.html">Visit the site</a> (a) contact.html (b) https://example.com (c) Visit the site (d) maths.html - 36.Which of these is an opening tag? (a) </h1> (b) <p> (c) </body> (d) </title>
-
37.🔗 Which words do you click on?
<a href="art.html">Take the quiz</a> (a) art.html (b) Play games (c) href (d) Take the quiz - 38.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="200"> (a) kite.png (b) width (c) Map of India (d) A red kite - 40.🌐 Which one shows pages from the web? (a) a web browser (b) a code editor (c) a web server
Answer key
- Riya’s Recipes
- cake.jpg
- <h6>
- <h1>
- a web server
- 4
- stores a website’s files
- About us
- </b>
- 1
- <img>
- <h1>
- </strong>
- to describe the image
- 3
- True
- <body>
- has a closing tag
- Contact us
- <ul>
- 6
- line 1
- to leave notes
- 2
- Contact us
- bullets
- the body
- Markup
- line 1
- href
- in the same tab
- True
- Planets
- True
- contact.html
- <p>
- Take the quiz
- Yes
- A red kite
- a web browser
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids