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 code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
-
2.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="300"> -
3.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="350"> (a) cake.jpg (b) map.png (c) Map of India (d) dog.jpg - 4.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
-
5.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow<br>Kites fly high<br>Birds sing</p> - 6.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a comment (d) a closing tag
- 7.🖼️ Which attribute of <img> tells which image to load? (a) height (b) src (c) width (d) alt
-
8.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Jamun</li>
</ol> (a) numbers (b) bullets - 9.💬 How does an HTML comment end? (a) >> (b) // (c) */ (d) -->
- 10.Which of these is true of a code editor? (a) has an address bar (b) shows pages from the web (c) shows line numbers (d) hosts websites online
- 11.True or false: <input> is an empty tag. (a) False (b) True
-
12.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="300"> (a) cake.jpg (b) A red kite (c) map.png (d) kite.png - 13.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
- 14.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) editor (d) address
- 15.Which of these is true of a code editor? (a) has an address bar (b) sends pages over the net (c) answers page requests (d) saves our .html files
- 16.Which of these is an opening tag? (a) </title> (b) </b> (c) <h1> (d) </h1>
- 17.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) is where we type code (d) shows pages from the web
-
18.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Cricket is fun.</p>
<h2>I love mangoes.</h2> - 19.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h4>? (a) <h4> (b) <h5> (c) <h1> (d) <h6>
-
20.🔗 Which words do you click on?
<a href="news.html">School news</a> (a) href (b) Take the quiz (c) School news (d) news.html - 21.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 22.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h6> or <h5>? (a) <h6> (b) <h1> (c) <h3> (d) <h5>
-
23.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="150"> - 24.🌍 Which program shows a web page to us? (a) a calculator (b) a music player (c) a web browser (d) a paint program
- 25.True or false: a web browser answers page requests. (a) True (b) False
-
26.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Planets</h1>
<p>Mars is red.</p>
</body>
</html> (a) body (b) Art Gallery (c) Mars is red. (d) Planets -
27.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Banana</li>
</ol> -
28.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="50"> (a) width (b) Map of India (c) Birthday cake (d) map.png - 29.🔍 Which is the odd one out? (a) stores a website’s files (b) colours code to help us (c) is where we type code (d) shows line numbers
- 30.Which of these has a closing tag? (a) <h1> (b) <input> (c) <meta> (d) <br>
- 31.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
- 32.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 33.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
- 34.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h6> or <h4>? (a) <h6> (b) <h2> (c) <h4> (d) <h1>
- 35.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
-
36.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> -->
<p>Fun facts</p>
<p>Hello, world!</p> (a) Hello, world! (b) Fun facts (c) I love mangoes. (d) Our school trip -
37.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="250"> (a) kite.png (b) A red kite (c) cake.jpg (d) map.png - 38.Which of these is a closing tag? (a) <b> (b) </body> (c) <h1> (d) <body>
- 39.📄 Where does the text of <title> appear? (a) on the browser tab (b) in a big heading (c) nowhere (d) at the bottom
- 40.True or false: <img> goes in the head. (a) True (b) False
Answer key
- <a href="about.html">
- 300
- map.png
- <ol>
- 4
- an attribute
- src
- numbers
- -->
- shows line numbers
- True
- kite.png
- <ul>
- element
- saves our .html files
- <h1>
- shows pages from the web
- 2
- <h1>
- School news
- Yes
- <h1>
- 150
- a web browser
- False
- Planets
- 2
- Map of India
- stores a website’s files
- <h1>
- <!DOCTYPE html>
- an empty tag
- a web server
- <h6>
- href
- Our school trip
- kite.png
- </body>
- on the browser tab
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids