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 paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> -->
<!-- <p>Good morning!</p> --> - 2.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
- 3.🔤 In “HTML”, what does the L stand for? (a) Line (b) Laptop (c) Link (d) Language
- 4.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h2>? (a) <h2> (b) <h3> (c) <h5> (d) <h1>
- 5.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the title (d) the body
- 6.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
7.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="50"> (a) fort.jpg (b) Our school bus (c) bus.jpg (d) tiger.jpg - 8.True or false: <title> goes in the head. (a) True (b) False
- 9.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) width (d) height
-
10.🔗 Where does this link open?
<a href="contact.html">Play games</a> (a) in the same tab (b) in a new tab -
11.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Jamun</li>
<li>Guava</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Grapes</li>
</ol> -
12.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Hello, world!</p>
<p>My pets</p>
<!-- <p>Fun facts</p> --> (a) Fun facts (b) My pets (c) I love mangoes. (d) Hello, world! -
13.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Stars shine<br>Sky is blue</p> -
14.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>Rain today</p> -->
<p>Our school trip</p> (a) My best friend (b) Rain today (c) Our school trip - 15.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 16.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
-
17.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Cricket is fun.</p>
<p>My best friend</p>
<h2>My pets</h2> - 18.🔢 In a basic web page file, which comes LAST? (a) </head> (b) <!DOCTYPE html> (c) <head> (d) </html>
- 19.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) height (d) alt
- 20.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
- 21.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a hash # (d) a slash /
-
22.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) Welcome! (b) Mars is red. (c) Space Facts (d) index.html - 23.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 24.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>
- 25.True or false: a web browser is where we type code. (a) True (b) False
- 26.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
27.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Mango</li>
</ul> (a) numbers (b) bullets -
28.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Banana</li>
<li>Papaya</li>
</ul> - 29.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 30.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <\h3> (c) </h3> (d) <h3>
-
31.🔗 Where does this link open?
<a href="games.html">Play games</a> (a) in the same tab (b) in a new tab - 32.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h6> or <h5>? (a) <h2> (b) <h3> (c) <h5> (d) <h6>
- 33.Which of these goes in the head? (a) <ul> (b) <link rel="stylesheet"> (c) <img> (d) <p>
- 34.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
- 35.📝 What does <br> do? (a) adds a picture (b) starts a new line (c) makes a list (d) makes text bold
-
36.🔍 Which line is missing its closing tag?
line 1: <small>Hello, world!</small>
line 2: <h2>The red kite</h2>
line 3: <b>Our school trip (a) line 2 (b) line 3 (c) line 1 -
37.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>Hello, world!</p>
<!-- <p>The red kite</p> --> - 38.True or false: in <img>, src tells which image to load. (a) False (b) True
- 39.Which of these has a closing tag? (a) <br> (b) <hr> (c) <li> (d) <input>
- 40.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
Answer key
- 1
- in the body
- Language
- <h5>
- the body
- has a closing tag
- bus.jpg
- True
- alt
- in the same tab
- 6
- Fun facts
- 4
- Rain today
- Yes
- No
- 3
- </html>
- alt
- <!DOCTYPE html>
- a slash /
- Space Facts
- an opening tag
- <ol>
- False
- an opening tag
- bullets
- 3
- Yes
- </h3>
- in the same tab
- <h6>
- <link rel="stylesheet">
- False
- starts a new line
- line 3
- 2
- True
- <li>
- an empty tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids