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 picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> (a) map.png (b) A tiger asleep (c) tiger.jpg (d) kite.png -
2.🔗 Which words do you click on?
<a href="about.html">School news</a> (a) Take the quiz (b) School news (c) href (d) about.html - 3.True or false: a code editor hosts websites online. (a) True (b) False
- 4.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 5.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 6.True or false: <meta> has a closing tag. (a) True (b) False
-
7.🔍 One closing tag is missing. Which one?
<h3>My pets
<u>Good morning!</u>
<h1>Hello, world!</h1> (a) </u> (b) </h1> (c) </h3> (d) </h2> - 8.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
9.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="350"> - 10.Which of these is an opening tag? (a) </li> (b) <b> (c) </p> (d) </h1>
-
11.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>My drawings</h1>
<p>Try this poha.</p>
</body>
</html> (a) Space Facts (b) body (c) Try this poha. (d) My drawings -
12.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>My best friend</p>
<!-- <p>Good morning!</p> --> (a) My best friend (b) Our school trip (c) Good morning! -
13.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red<br>Stars shine</p> - 14.Which of these is true of a code editor? (a) has an address bar (b) sends pages over the net (c) stores a website’s files (d) saves our .html files
- 15.🔢 In a basic web page file, which comes first: “</body>” or “</html>”? (a) </body> (b) </html>
- 16.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 6 (d) 3
- 17.True or false: HTML on its own cannot make headings. (a) False (b) True
- 18.True or false: <ul> lists steps in order. (a) True (b) False
- 19.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) HyperText (c) High Tech (d) Hot Tags
-
20.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Planets</h1>
<p>Here is my best one.</p>
</body>
</html> (a) body (b) Planets (c) Here is my best one. (d) Space Facts -
21.🔗 Where does this link open?
<a href="https://example.com" target="_blank">School news</a> (a) in the same tab (b) in a new tab - 22.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it blank (d) makes it bold
- 23.True or false: <li> is an empty tag. (a) False (b) True
- 24.True or false: HTML on its own cannot make tables. (a) False (b) True
-
25.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Good morning!</p>
<p>Hello, world!</p> - 26.Which of these is true of a web browser? (a) sends pages over the net (b) hosts websites online (c) opens web pages for us (d) colours code to help us
-
27.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p> (a) Fun facts (b) I love mangoes. (c) My best friend -
28.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h4>Hello, world!</h4>
<h4>The red kite</h4>
<p>The red kite</p> - 29.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) alt (d) src
-
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="400"> (a) map.png (b) Birthday cake (c) width (d) Map of India - 31.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 32.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to colour it (d) to load it faster
-
33.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p>
<p>Our school trip</p> (a) Our school trip (b) Cricket is fun. (c) Fun facts - 34.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
-
35.🔍 One closing tag is missing. Which one?
<h2>Cricket is fun.</h2>
<i>My pets
<p>Fun facts</p> (a) </h2> (b) </b> (c) </i> (d) </p> -
36.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Mango</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Orange</li>
</ol> - 37.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h6>? (a) <h6> (b) <h1> (c) <h2> (d) <h4>
- 38.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 39.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
- 40.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) </strong> (c) <\strong> (d) <strong/>
Answer key
- tiger.jpg
- School news
- False
- Yes
- Yes
- False
- </h3>
- an empty tag
- 350
- <b>
- My drawings
- Good morning!
- 3
- saves our .html files
- </body>
- 6
- False
- False
- HyperText
- Planets
- in a new tab
- opens it in a new tab
- False
- False
- 1
- opens web pages for us
- Fun facts
- 3
- src
- Map of India
- an opening tag
- to describe the image
- Cricket is fun.
- No
- </i>
- 2
- <h1>
- an opening tag
- <ul>
- </strong>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids