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 words do you click on?
<a href="art.html">About us</a> (a) Contact us (b) About us (c) art.html (d) href - 2.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
- 3.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) src (c) height (d) width
- 4.True or false: in <img>, alt sets how wide it is. (a) True (b) False
- 5.True or false: HTML on its own cannot pick a random number. (a) False (b) True
- 6.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 7.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
-
8.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p> -
9.🔗 Which address opens when you click this link?
<a href="contact.html">Art corner</a> (a) https://example.com (b) maths.html (c) contact.html (d) Art corner - 10.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 11.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
- 12.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
- 13.🖼️ Which attribute of <img> names the picture file? (a) src (b) height (c) width (d) alt
- 14.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
-
15.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Stars shine<br>Rivers flow<br>Birds sing</p> - 16.📋 Which list suits a shopping list in any order? (a) <br> (b) <ul> (c) <hr> (d) <ol>
- 17.True or false: <p> goes in the head. (a) True (b) False
-
18.🔗 Where does this link open?
<a href="games.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab -
19.💬 How many paragraphs show on the page?
<p>The red kite</p>
<p>Fun facts</p>
<!-- <p>My best friend</p> -->
<p>Cricket is fun.</p> - 20.True or false: a web server has an address bar. (a) False (b) True
- 21.True or false: a code editor saves our .html files. (a) True (b) False
-
22.🔍 One closing tag is missing. Which one?
<h2>Rain today</h2>
<u>Fun facts
<strong>Hello, world!</strong> (a) </small> (b) </u> (c) </h2> (d) </strong> -
23.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="100"> (a) A red kite (b) kite.png (c) map.png (d) cake.jpg -
24.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Orange</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Mango</li>
</ul> - 25.True or false: <style> goes in the head. (a) False (b) True
- 26.True or false: in <img>, alt describes the picture. (a) False (b) True
-
27.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Fun facts</p>
<!-- <p>Cricket is fun.</p> --> (a) The red kite (b) Fun facts (c) Cricket is fun. -
28.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="250"> - 29.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 30.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 31.True or false: HTML on its own can make bullet lists. (a) True (b) False
- 32.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <ul> (d) <li>
-
33.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Mango</li>
</ol> (a) numbers (b) bullets -
34.🔗 Where does this link open?
<a href="news.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab -
35.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>My best friend</p>
<!-- <p>My pets</p> --> - 36.True or false: <title> goes in the head. (a) True (b) False
-
37.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="250"> (a) Birthday cake (b) width (c) Map of India (d) map.png - 38.🔍 Which is the odd one out? (a) answers page requests (b) saves our .html files (c) stores a website’s files (d) hosts websites online
- 39.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
- 40.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) <h1> (d) </h1>
Answer key
- About us
- a web browser
- alt
- False
- True
- in the head
- href
- 1
- contact.html
- an opening tag
- <!DOCTYPE html>
- <ol>
- src
- in the body
- 4
- <ul>
- False
- in a new tab
- 3
- False
- True
- </u>
- kite.png
- 5
- True
- True
- Cricket is fun.
- 250
- an empty tag
- an empty tag
- True
- <li>
- numbers
- in a new tab
- 3
- True
- Map of India
- saves our .html files
- <a>
- </h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids