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.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Sky is blue<br>Roses are red<br>Rivers flow<br>Kites fly high</p> - 2.📄 Can HTML on its own count button clicks? (a) Yes (b) No
-
3.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="200"> (a) dog.jpg (b) width (c) A happy dog (d) The full moon - 4.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 5.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
-
6.🔗 Which address opens when you click this link?
<a href="games.html">Art corner</a> (a) games.html (b) Art corner (c) contact.html (d) about.html - 7.Which of these goes in the body? (a) <style> (b) <meta charset="utf-8"> (c) <title> (d) <a>
- 8.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 9.🔍 Which is the odd one out? (a) shows line numbers (b) stores a website’s files (c) saves our .html files (d) is where we type code
- 10.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
- 11.🔍 Which is the odd one out? (a) opens web pages for us (b) sends pages over the net (c) has an address bar (d) shows pages from the web
- 12.True or false: in <img>, height sets how tall it is. (a) False (b) True
- 13.🔍 Which is the odd one out? (a) has an address bar (b) saves our .html files (c) opens web pages for us (d) shows pages from the web
-
14.🔗 Which address opens when you click this link?
<a href="art.html">Maths fun</a> (a) quiz.html (b) Maths fun (c) art.html (d) news.html - 15.📄 Where does the text of <title> appear? (a) at the bottom (b) on the browser tab (c) nowhere (d) in a big heading
- 16.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
-
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="150"> (a) Birthday cake (b) map.png (c) width (d) Map of India - 18.True or false: in <img>, src names the picture file. (a) False (b) True
-
19.📋 What number does the browser show next to “Guava”?
<ol start="5">
<li>Banana</li>
<li>Guava</li>
<li>Orange</li>
</ol> - 20.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <h1/> (c) </h1> (d) <\h1>
- 21.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <h1> (d) <p>
- 22.True or false: <h1> has a closing tag. (a) False (b) True
-
23.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="50"> -
24.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>My best friend</p>
<!-- <p>Fun facts</p> --> -
25.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) width (b) A tiger asleep (c) A red kite (d) tiger.jpg - 26.💬 Does the browser show comments on the page? (a) No (b) Yes
- 27.Which of these is true of a web browser? (a) sends pages over the net (b) is where we type code (c) opens web pages for us (d) saves our .html files
- 28.Which of these is true of a web browser? (a) hosts websites online (b) turns HTML into a page (c) sends pages over the net (d) shows line numbers
- 29.🌐 Which one saves our .html files? (a) a web server (b) a web browser (c) a code editor
- 30.Which of these is a closing tag? (a) <li> (b) <body> (c) </title> (d) <p>
- 31.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) alt (d) height
-
32.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine<br>Birds sing</p> - 33.🧱 HTML gives a web page its ___. (a) speed (b) colours (c) structure (d) sound
-
34.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) body (b) I like to read. (c) My Hobbies (d) Easy snacks - 35.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) src (c) height (d) alt
-
36.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Rain today</p>
<p>Our school trip</p> -
37.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) Play games (b) About us (c) contact.html (d) href -
38.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>My pets</p>
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> --> -
39.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>My best friend</p>
<p>Fun facts</p>
<h2>Rain today</h2>
<h2>Hello, world!</h2> - 40.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
Answer key
- 5
- No
- A happy dog
- No
- a code editor
- games.html
- <a>
- an empty tag
- stores a website’s files
- True
- sends pages over the net
- True
- saves our .html files
- art.html
- on the browser tab
- in the head
- Map of India
- True
- 6
- </h1>
- <h1>
- True
- 50
- 2
- A tiger asleep
- No
- opens web pages for us
- turns HTML into a page
- a code editor
- </title>
- alt
- 3
- structure
- Easy snacks
- alt
- 2
- Play games
- 2
- 3
- <!--
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids