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.🔢 In a basic web page file, which comes LAST? (a) </head> (b) </body> (c) <body> (d) </html>
- 2.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
-
3.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Cricket Club (b) All about me (c) Here is my best one. (d) body - 4.True or false: HTML on its own can show paragraphs. (a) False (b) True
-
5.🔍 One closing tag is missing. Which one?
<h2>Cricket is fun.</h2>
<em>My pets
<b>Rain today</b> (a) </h2> (b) </h1> (c) </em> (d) </b> - 6.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 7.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <ul> (d) <style>
- 8.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
9.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>My pets</p>
<!-- <p>Good morning!</p> -->
<p>My best friend</p> (a) My pets (b) My best friend (c) Our school trip (d) Good morning! -
10.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Grapes</li>
<li>Litchi</li>
<li>Banana</li>
<li>Guava</li>
</ol> - 11.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the body (d) the doctype
-
12.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="50"> (a) Map of India (b) kite.png (c) width (d) A red kite - 13.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
- 14.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h1> or <h6>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>
-
15.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine<br>Birds sing</p> - 16.Which of these is true of a web browser? (a) answers page requests (b) opens web pages for us (c) saves our .html files (d) stores a website’s files
-
17.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Mango</li>
</ol> (a) numbers (b) bullets -
18.🔗 Where does this link open?
<a href="about.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab - 19.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) src (d) height
- 20.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 21.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
- 22.Which of these is an empty tag? (a) <p> (b) <li> (c) <hr> (d) <h1>
-
23.🔍 One closing tag is missing. Which one?
<h2>Hello, world!
<u>Our school trip</u>
<em>Fun facts</em> (a) </h2> (b) </u> (c) </em> (d) </strong> - 24.Which of these is true of a web browser? (a) answers page requests (b) sends pages over the net (c) turns HTML into a page (d) saves our .html files
- 25.True or false: HTML on its own can make links to pages. (a) True (b) False
- 26.🏷️ HTML marks up text using ___. (a) wires (b) pixels (c) keys (d) tags
-
27.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="50"> -
28.🔗 Where does this link open?
<a href="contact.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 29.True or false: <style> goes in the head. (a) False (b) True
-
30.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>Our school trip</p> -->
<p>My pets</p>
<p>Rain today</p> -
31.🔍 One closing tag is missing. Which one?
<small>Rain today</small>
<h3>The red kite
<h2>Good morning!</h2> (a) </small> (b) </h1> (c) </h3> (d) </h2> - 32.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <head> (d) <body>
-
33.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<p>Hello, world!</p> (a) Hello, world! (b) Cricket is fun. (c) Good morning! (d) I love mangoes. -
34.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>Rain today</p>
<p>Our school trip</p>
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p> -
35.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Kites fly high</p> - 36.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h4>? (a) <h1> (b) <h2> (c) <h3> (d) <h4>
-
37.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Papaya</li>
<li>Jamun</li>
</ol> -
38.🔗 Which address opens when you click this link?
<a href="about.html">Art corner</a> (a) contact.html (b) https://example.com (c) Art corner (d) about.html -
39.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) moon.png (b) cake.jpg (c) dog.jpg (d) Birthday cake -
40.🔗 Which words do you click on?
<a href="games.html">Art corner</a> (a) School news (b) Art corner (c) href (d) games.html
Answer key
- </html>
- <li>
- All about me
- True
- </em>
- No
- <ul>
- an empty tag
- Good morning!
- 2
- the body
- A red kite
- 6
- <h1>
- 3
- opens web pages for us
- numbers
- in a new tab
- height
- True
- in the body
- <hr>
- </h2>
- turns HTML into a page
- True
- tags
- 50
- in a new tab
- True
- 2
- </h3>
- <!DOCTYPE html>
- Good morning!
- 4
- 3
- <h4>
- 3
- about.html
- cake.jpg
- Art corner
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids