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.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>Good morning!</h2>
<h3>I love mangoes.</h3>
<p>Hello, world!</p> - 2.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
- 3.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to load it faster (c) to colour it (d) to make it bigger
-
4.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>The red kite</p>
<!-- <p>Good morning!</p> --> (a) The red kite (b) I love mangoes. (c) Good morning! -
5.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Fun facts</p>
<!-- <p>Rain today</p> --> (a) I love mangoes. (b) Rain today (c) Fun facts -
6.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) cake.jpg (b) Birthday cake (c) moon.png (d) dog.jpg - 7.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ol> (c) <ul>
- 8.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) Hot Tags (c) High Tech (d) Home Text
-
9.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p>
<p>Rain today</p> (a) Hello, world! (b) Rain today (c) I love mangoes. - 10.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h1> or <h3>? (a) <h3> (b) <h1> (c) <h2> (d) <h5>
- 11.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) alt (d) height
-
12.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>Our school trip</p>
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p> (a) Hello, world! (b) Fun facts (c) I love mangoes. (d) Our school trip - 13.True or false: a web server shows line numbers. (a) False (b) True
- 14.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <ul> (c) <h1> (d) <img>
- 15.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 16.🔠 How many heading levels does HTML have? (a) 3 (b) 6 (c) 4 (d) 10
- 17.True or false: in <img>, alt describes the picture. (a) True (b) False
- 18.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Markup (c) Modern (d) Mouse
- 19.True or false: <ul> is an empty tag. (a) True (b) False
-
20.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Banana</li>
</ol> (a) bullets (b) numbers - 21.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
22.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="50"> - 23.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
- 24.🏷️ Which is the closing tag for <h3>? (a) </h3> (b) <h3/> (c) <\h3> (d) <h3>
- 25.🌐 Which one turns HTML into a page? (a) a web browser (b) a code editor (c) a web server
-
26.🔍 Which line is missing its closing tag?
line 1: <h3>My best friend
line 2: <b>Fun facts</b>
line 3: <h2>My pets</h2> (a) line 3 (b) line 2 (c) line 1 - 27.🔍 Which is the odd one out? (a) opens web pages for us (b) turns HTML into a page (c) shows pages from the web (d) colours code to help us
- 28.Which of these has a closing tag? (a) <input> (b) <img> (c) <hr> (d) <p>
- 29.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 30.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
- 31.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) width (d) src
- 32.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) an element name (d) a comment
-
33.🔗 Which address opens when you click this link?
<a href="art.html">Visit the site</a> (a) Visit the site (b) quiz.html (c) news.html (d) art.html -
34.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red<br>Birds sing<br>Kites fly high</p> -
35.🔗 Which address opens when you click this link?
<a href="maths.html">About us</a> (a) About us (b) maths.html (c) news.html (d) art.html -
36.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Match report (b) We won by 5 runs. (c) index.html (d) Riya’s Recipes - 37.True or false: <ul> shows bullet points. (a) True (b) False
- 38.True or false: <ol> lists steps in order. (a) True (b) False
- 39.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h1> or <h3>? (a) <h3> (b) <h4> (c) <h6> (d) <h1>
- 40.True or false: <ol> is an unordered list. (a) True (b) False
Answer key
- 3
- a web browser
- to describe the image
- Good morning!
- Rain today
- cake.jpg
- <li>
- HyperText
- Hello, world!
- <h5>
- alt
- Fun facts
- False
- <meta charset="utf-8">
- No
- 6
- True
- Markup
- False
- numbers
- has a closing tag
- 50
- <!--
- </h3>
- a web browser
- line 1
- colours code to help us
- <p>
- Yes
- -->
- src
- an attribute
- art.html
- 4
- maths.html
- Riya’s Recipes
- True
- True
- <h1>
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids