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.True or false: <hr> has a closing tag. (a) True (b) False
-
2.🔍 One closing tag is missing. Which one?
<em>Hello, world!
<p>Good morning!</p>
<strong>Fun facts</strong> (a) </p> (b) </strong> (c) </em> (d) </h3> -
3.🔗 Where does this link open?
<a href="news.html">School news</a> (a) in a new tab (b) in the same tab - 4.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h3>? (a) <h1> (b) <h5> (c) <h4> (d) <h3>
- 5.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
-
6.📋 What number does the browser show next to “Papaya”?
<ol start="3">
<li>Orange</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Guava</li>
<li>Papaya</li>
<li>Litchi</li>
</ol> - 7.Which of these is true of a web browser? (a) is where we type code (b) shows line numbers (c) stores a website’s files (d) has an address bar
- 8.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <ol> (d) <li>
-
9.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="100"> - 10.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
11.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>My pets</p> -->
<!-- <p>My best friend</p> -->
<!-- <p>Good morning!</p> --> - 12.📋 Which list suits a shopping list in any order? (a) <br> (b) <ul> (c) <ol> (d) <hr>
- 13.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
-
14.🔗 Which address opens when you click this link?
<a href="about.html">Visit the site</a> (a) about.html (b) contact.html (c) https://example.com (d) Visit the site - 15.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h5>? (a) <h3> (b) <h2> (c) <h5> (d) <h4>
-
16.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Match report</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Match report (b) Art Gallery (c) We won by 5 runs. (d) body - 17.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as one space (c) as a dot (d) as a new line
- 18.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h5> or <h3>? (a) <h5> (b) <h3> (c) <h1> (d) <h4>
- 19.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
-
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="250"> (a) width (b) The full moon (c) A happy dog (d) dog.jpg - 21.💬 Does the browser show comments on the page? (a) Yes (b) No
-
22.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Birds sing<br>Kites fly high<br>Sky is blue</p> -
23.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) index.html (b) Mars is red. (c) All about me (d) Cricket Club - 24.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Laptop (d) Language
-
25.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> --> (a) Good morning! (b) Cricket is fun. (c) Our school trip -
26.📋 What number does the browser show next to “Orange”?
<ol start="4">
<li>Litchi</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Orange</li>
<li>Mango</li>
</ol> - 27.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) a comment (d) an attribute
- 28.Which of these has a closing tag? (a) <br> (b) <li> (c) <hr> (d) <meta>
-
29.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Litchi</li>
<li>Grapes</li>
<li>Guava</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Mango</li>
</ol> - 30.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) at the bottom (d) in a big heading
-
31.🔗 Which address opens when you click this link?
<a href="https://example.com">Visit the site</a> (a) Visit the site (b) art.html (c) maths.html (d) https://example.com -
32.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>The red kite</p>
<p>Cricket is fun.</p> -
33.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> (a) width (b) A red kite (c) tiger.jpg (d) A tiger asleep - 34.Which of these goes in the head? (a) <img> (b) <p> (c) <h1> (d) <title>
-
35.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red<br>Rivers flow<br>Sky is blue</p> -
36.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Mango</li>
</ul> - 37.True or false: <ol> is an unordered list. (a) True (b) False
-
38.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> -->
<!-- <p>The red kite</p> --> - 39.📝 What do we need to write HTML? (a) a printer (b) a microphone (c) a paintbrush (d) a plain text editor
- 40.🖼️ Which attribute of <img> describes the picture? (a) width (b) height (c) src (d) alt
Answer key
- False
- </em>
- in the same tab
- <h5>
- 6
- 7
- has an address bar
- <li>
- 100
- Yes
- 1
- <ul>
- href
- about.html
- <h2>
- Match report
- as one space
- <h1>
- <h1>
- A happy dog
- No
- 4
- Cricket Club
- Language
- Our school trip
- 8
- an attribute
- <li>
- 5
- on the browser tab
- https://example.com
- 3
- A tiger asleep
- <title>
- 4
- 2
- False
- 1
- a plain text editor
- alt
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids