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 list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
- 2.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to load it faster (d) to make it bigger
-
3.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>My pets</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>Fun facts</p> --> -
4.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>My drawings</h1>
<p>Here is my best one.</p>
</body>
</html> (a) My drawings (b) index.html (c) My Hobbies (d) Here is my best one. -
5.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) Cricket Club (c) Easy snacks (d) body -
6.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) index.html (b) Easy snacks (c) Riya’s Recipes (d) Try this poha. -
7.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="50"> (a) fort.jpg (b) tiger.jpg (c) kite.png (d) An old fort - 8.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 9.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) src (d) width
-
10.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Jamun</li>
<li>Grapes</li>
</ol> (a) bullets (b) numbers -
11.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="200"> (a) width (b) An old fort (c) bus.jpg (d) Our school bus -
12.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Jamun</li>
</ol> (a) bullets (b) numbers -
13.🔗 Which address opens when you click this link?
<a href="news.html">About us</a> (a) quiz.html (b) news.html (c) About us (d) games.html - 14.📋 Which list tag is one item of a list? (a) <li> (b) <ul> (c) <ol>
- 15.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <hr> (d) <br>
- 16.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) nowhere (d) in a big heading
- 17.💬 How does an HTML comment start? (a) /* (b) // (c) <!-- (d) #
-
18.🔗 Which words do you click on?
<a href="art.html">About us</a> (a) href (b) About us (c) art.html (d) Contact us - 19.True or false: <style> goes in the body. (a) True (b) False
-
20.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Cricket Club (b) Thanks for visiting. (c) All about me (d) body -
21.📄 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) body (c) Art Gallery (d) Match report - 22.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <img> (d) <p>
- 23.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
- 24.True or false: <li> is an unordered list. (a) True (b) False
- 25.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
- 26.True or false: HTML on its own can make a form. (a) False (b) True
-
27.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Fun facts</p>
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> --> - 28.🔍 Which is the odd one out? (a) answers page requests (b) sends pages over the net (c) stores a website’s files (d) turns HTML into a page
-
29.🔗 Which words do you click on?
<a href="news.html">Visit the site</a> (a) Maths fun (b) href (c) Visit the site (d) news.html - 30.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the head (d) the body
-
31.🔍 Which line is missing its closing tag?
line 1: <u>Hello, world!</u>
line 2: <p>Rain today
line 3: <i>Fun facts</i> (a) line 3 (b) line 2 (c) line 1 - 32.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
33.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Our school trip</p> -->
<p>The red kite</p> (a) Our school trip (b) Hello, world! (c) The red kite - 34.True or false: <ul> is an ordered list. (a) False (b) True
- 35.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
- 36.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a new line (c) as a dot (d) as 5 spaces
- 37.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 38.📄 Can HTML on its own keep a high score? (a) No (b) Yes
- 39.💬 Does the browser show comments on the page? (a) Yes (b) No
- 40.Which of these is true of a code editor? (a) opens web pages for us (b) sends pages over the net (c) answers page requests (d) shows line numbers
Answer key
- <ul>
- to describe the image
- 1
- My Hobbies
- Easy snacks
- Riya’s Recipes
- fort.jpg
- an empty tag
- alt
- numbers
- Our school bus
- numbers
- news.html
- <li>
- <ul>
- on the browser tab
- <!--
- About us
- False
- All about me
- Match report
- <img>
- -->
- False
- a code editor
- True
- 2
- turns HTML into a page
- Visit the site
- the body
- line 2
- an opening tag
- Our school trip
- False
- <a>
- as one space
- Yes
- No
- No
- shows line numbers
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids