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 line is missing its closing tag?
line 1: <i>Good morning!</i>
line 2: <h3>Our school trip
line 3: <small>Fun facts</small> (a) line 2 (b) line 1 (c) line 3 - 2.True or false: in <img>, alt describes the picture. (a) True (b) False
-
3.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>The red kite</p>
<!-- <p>My best friend</p> -->
<p>Fun facts</p>
<p>Hello, world!</p> -
4.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red<br>Stars shine</p> - 5.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h1> or <h4>? (a) <h6> (b) <h5> (c) <h4> (d) <h1>
- 6.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
- 7.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) High Tech (c) Hot Tags (d) HyperText
- 8.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
- 9.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
10.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Our school trip</p>
<!-- <p>The red kite</p> --> (a) Our school trip (b) The red kite (c) I love mangoes. - 11.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h4>? (a) <h2> (b) <h1> (c) <h6> (d) <h4>
-
12.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Match report</h1>
<p>Try this poha.</p>
</body>
</html> (a) body (b) Space Facts (c) Match report (d) Try this poha. - 13.True or false: <ol> goes inside ul or ol. (a) True (b) False
- 14.True or false: <b> has a closing tag. (a) False (b) True
- 15.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <strong/> (c) </strong> (d) <\strong>
-
16.🖼️ 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 - 17.Which of these is true of a web browser? (a) sends pages over the net (b) has an address bar (c) hosts websites online (d) is where we type code
-
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) width (b) dog.jpg (c) The full moon (d) A happy dog - 19.True or false: <li> goes inside ul or ol. (a) False (b) True
-
20.🔗 Which address opens when you click this link?
<a href="art.html">About us</a> (a) quiz.html (b) About us (c) art.html (d) news.html -
21.🔗 Where does this link open?
<a href="contact.html" target="_blank">About us</a> (a) in a new tab (b) in the same tab -
22.🔍 Which line is missing its closing tag?
line 1: <small>Cricket is fun.</small>
line 2: <p>I love mangoes.</p>
line 3: <strong>My pets (a) line 3 (b) line 2 (c) line 1 -
23.📋 Does this list show bullets or numbers?
<ol>
<li>Litchi</li>
<li>Guava</li>
</ol> (a) bullets (b) numbers -
24.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>The red kite</p> -->
<p>Hello, world!</p>
<p>Cricket is fun.</p>
<!-- <p>Fun facts</p> --> -
25.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="250"> (a) The full moon (b) bus.jpg (c) fort.jpg (d) moon.png - 26.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 27.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) alt (d) width
- 28.🔍 Which is the odd one out? (a) opens web pages for us (b) colours code to help us (c) shows pages from the web (d) turns HTML into a page
- 29.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 30.📝 What does <p> make? (a) a table (b) a paragraph (c) a link (d) a picture
-
31.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="400"> (a) cake.jpg (b) kite.png (c) A red kite (d) map.png -
32.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="100"> (a) map.png (b) kite.png (c) A red kite (d) cake.jpg - 33.🌐 Which one opens web pages for us? (a) a code editor (b) a web browser (c) a web server
-
34.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p>
<p>Hello, world!</p> (a) My best friend (b) I love mangoes. (c) Cricket is fun. (d) Hello, world! - 35.Which of these is an opening tag? (a) </p> (b) <li> (c) </h1> (d) </b>
- 36.📝 What does <hr> draw? (a) a line across the page (b) a table (c) a picture (d) a link
-
37.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Cricket is fun.</p>
<!-- <p>Good morning!</p> --> (a) Good morning! (b) The red kite (c) Cricket is fun. - 38.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h6>? (a) <h3> (b) <h5> (c) <h1> (d) <h6>
- 39.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h4>? (a) <h4> (b) <h3> (c) <h1> (d) <h6>
- 40.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h6> or <h2>? (a) <h2> (b) <h3> (c) <h5> (d) <h6>
Answer key
- line 2
- True
- 4
- 3
- <h1>
- <li>
- HyperText
- a web browser
- has a closing tag
- The red kite
- <h1>
- Match report
- False
- True
- </strong>
- Map of India
- has an address bar
- A happy dog
- True
- art.html
- in a new tab
- line 3
- numbers
- 3
- moon.png
- has a closing tag
- width
- colours code to help us
- Yes
- a paragraph
- kite.png
- kite.png
- a web browser
- Cricket is fun.
- <li>
- a line across the page
- Good morning!
- <h1>
- <h1>
- <h6>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids