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.🔍 One closing tag is missing. Which one?
<u>Fun facts</u>
<p>I love mangoes.</p>
<h2>Good morning! (a) </p> (b) </u> (c) </em> (d) </h2> - 2.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the body (d) the doctype
-
3.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Grapes</li>
<li>Banana</li>
</ol> (a) numbers (b) bullets - 4.Which of these is true of a code editor? (a) sends pages over the net (b) shows pages from the web (c) shows line numbers (d) hosts websites online
- 5.📋 Which list suits a shopping list in any order? (a) <ul> (b) <ol> (c) <br> (d) <hr>
- 6.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
- 7.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 8.📄 Can HTML on its own make tables? (a) No (b) Yes
- 9.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
- 10.True or false: HTML on its own can run a game loop. (a) True (b) False
-
11.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Banana</li>
<li>Mango</li>
</ol> (a) bullets (b) numbers - 12.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h4>? (a) <h5> (b) <h4> (c) <h2> (d) <h1>
-
13.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> --> (a) The red kite (b) Our school trip (c) I love mangoes. -
14.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Banana</li>
<li>Orange</li>
<li>Guava</li>
<li>Mango</li>
<li>Papaya</li>
</ul> -
15.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Litchi</li>
<li>Papaya</li>
</ol> (a) bullets (b) numbers - 16.💬 How does an HTML comment end? (a) // (b) >> (c) */ (d) -->
- 17.🏷️ Which is the closing tag for <small>? (a) </small> (b) <\small> (c) <small> (d) <small/>
- 18.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h3> or <h5>? (a) <h4> (b) <h5> (c) <h6> (d) <h3>
-
19.🔍 Which line is missing its closing tag?
line 1: <strong>Good morning!
line 2: <u>My pets</u>
line 3: <h3>Fun facts</h3> (a) line 3 (b) line 2 (c) line 1 -
20.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<h2>Cricket is fun.</h2>
<p>Our school trip</p> - 21.Which of these has a closing tag? (a) <hr> (b) <br> (c) <img> (d) <p>
- 22.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
-
23.🔗 Where does this link open?
<a href="maths.html">Contact us</a> (a) in the same tab (b) in a new tab - 24.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 25.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an attribute (d) an element name
- 26.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
-
27.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Good morning!</p>
<h2>Good morning!</h2> -
28.📄 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>Try this poha.</p>
</body>
</html> (a) Match report (b) index.html (c) Riya’s Recipes (d) Try this poha. -
29.📋 What number does the browser show next to “Litchi”?
<ol start="3">
<li>Banana</li>
<li>Guava</li>
<li>Grapes</li>
<li>Litchi</li>
<li>Papaya</li>
</ol> -
30.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>I love mangoes.</p>
<h2>My best friend</h2>
<p>Cricket is fun.</p> - 31.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
- 32.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to make it bigger (d) to load it faster
- 33.Which of these is a closing tag? (a) <body> (b) <title> (c) <p> (d) </title>
-
34.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>Fun facts</h2>
<h4>Cricket is fun.</h4> -
35.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> (a) A red kite (b) A tiger asleep (c) width (d) tiger.jpg - 36.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h4> or <h5>? (a) <h5> (b) <h6> (c) <h1> (d) <h4>
- 37.True or false: HTML on its own can make bullet lists. (a) True (b) False
-
38.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Mango</li>
<li>Litchi</li>
</ol> (a) numbers (b) bullets - 39.True or false: a web browser saves our .html files. (a) True (b) False
- 40.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
Answer key
- </h2>
- the body
- numbers
- shows line numbers
- <ul>
- <ul>
- an empty tag
- Yes
- href
- False
- numbers
- <h1>
- Our school trip
- 6
- numbers
- -->
- </small>
- <h3>
- line 1
- 4
- <p>
- <ol>
- in the same tab
- has a closing tag
- an attribute
- in the body
- 2
- Riya’s Recipes
- 6
- 4
- <ol>
- to describe the image
- </title>
- 3
- A tiger asleep
- <h1>
- True
- numbers
- False
- an opening tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids