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.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
- 2.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
-
3.🔗 Where does this link open?
<a href="news.html" target="_blank">Take the quiz</a> (a) in the same tab (b) in a new tab - 4.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <ul> (d) <br>
- 5.🔍 Which is the odd one out? (a) turns HTML into a page (b) stores a website’s files (c) hosts websites online (d) answers page requests
- 6.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
- 7.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
- 8.🖼️ Which attribute of <img> describes the picture? (a) alt (b) src (c) height (d) width
-
9.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="50"> (a) bus.jpg (b) fort.jpg (c) tiger.jpg (d) Our school bus -
10.🔗 Where does this link open?
<a href="quiz.html">Maths fun</a> (a) in the same tab (b) in a new tab - 11.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <pic> (d) <img>
-
12.📋 What number does the browser show next to “Mango”?
<ol>
<li>Papaya</li>
<li>Banana</li>
<li>Mango</li>
</ol> -
13.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p>
<!-- <p>My best friend</p> --> - 14.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
- 15.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
16.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Orange</li>
</ol> (a) bullets (b) numbers -
17.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Hello, world!</p>
<!-- <p>Good morning!</p> -->
<!-- <p>My pets</p> --> - 18.True or false: HTML on its own cannot make tables. (a) False (b) True
- 19.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <ul> (d) <hr>
-
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="100"> (a) Birthday cake (b) map.png (c) width (d) Map of India - 21.Which of these is true of a web browser? (a) hosts websites online (b) stores a website’s files (c) is where we type code (d) opens web pages for us
-
22.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="300"> (a) dog.jpg (b) map.png (c) Map of India (d) cake.jpg - 23.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 24.🔠 How many heading levels does HTML have? (a) 3 (b) 6 (c) 10 (d) 4
- 25.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <head> (c) <html> (d) <body>
- 26.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h6> or <h3>? (a) <h4> (b) <h1> (c) <h3> (d) <h6>
-
27.🔍 One closing tag is missing. Which one?
<h1>I love mangoes.</h1>
<small>Cricket is fun.
<em>My best friend</em> (a) </em> (b) </strong> (c) </small> (d) </h1> - 28.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ul> (d) <ol>
-
29.🔗 Which words do you click on?
<a href="about.html">Visit the site</a> (a) Maths fun (b) about.html (c) Visit the site (d) href -
30.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="50"> -
31.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="150"> - 32.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <strong/> (c) <\strong> (d) </strong>
- 33.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 10 (d) 6
-
34.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Easy snacks (b) Thanks for visiting. (c) index.html (d) Cricket Club - 35.True or false: a web browser sends pages over the net. (a) False (b) True
- 36.📄 Can HTML on its own run a game loop? (a) No (b) Yes
- 37.Which of these is true of a web browser? (a) colours code to help us (b) hosts websites online (c) is where we type code (d) has an address bar
- 38.True or false: a code editor shows line numbers. (a) True (b) False
-
39.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) body (b) Try this poha. (c) Welcome! (d) Cricket Club - 40.🔍 Which is the odd one out? (a) is where we type code (b) stores a website’s files (c) colours code to help us (d) shows line numbers
Answer key
- in the head
- href
- in a new tab
- <ol>
- turns HTML into a page
- a code editor
- to leave notes
- alt
- bus.jpg
- in the same tab
- <img>
- 3
- 2
- on the browser tab
- an opening tag
- numbers
- 1
- False
- <ul>
- Map of India
- opens web pages for us
- map.png
- No
- 6
- <!DOCTYPE html>
- <h1>
- </small>
- <li>
- Visit the site
- 50
- 150
- </strong>
- 1
- Cricket Club
- False
- No
- has an address bar
- True
- Welcome!
- stores a website’s files
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids