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 first: “<body>” or “<html>”? (a) <html> (b) <body>
- 2.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 10 (d) 3
- 3.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h1> (d) <h6>
- 4.Which of these is true of a web browser? (a) stores a website’s files (b) turns HTML into a page (c) hosts websites online (d) saves our .html files
- 5.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
- 6.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
-
7.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Jamun</li>
<li>Mango</li>
<li>Papaya</li>
</ul> - 8.True or false: HTML on its own can make a form. (a) False (b) True
-
9.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Our school trip</p>
<!-- <p>My best friend</p> -->
<!-- <p>My pets</p> --> - 10.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 11.📄 Where does the text of <title> appear? (a) in a big heading (b) at the bottom (c) on the browser tab (d) nowhere
- 12.True or false: <p> has a closing tag. (a) True (b) False
-
13.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>My best friend</h2>
<p>Good morning!</p>
<p>Cricket is fun.</p>
<p>Hello, world!</p> -
14.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> -->
<p>My best friend</p>
<p>The red kite</p> (a) Rain today (b) Cricket is fun. (c) The red kite (d) My best friend -
15.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Mango</li>
</ul> - 16.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 17.🔢 In a basic web page file, which comes first: “</body>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </body>
- 18.True or false: a code editor hosts websites online. (a) False (b) True
- 19.🔢 In a basic web page file, which comes first: “<html>” or “<!DOCTYPE html>”? (a) <html> (b) <!DOCTYPE html>
-
20.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Jamun</li>
<li>Banana</li>
</ol> (a) bullets (b) numbers - 21.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) editor (d) attribute
- 22.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 23.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
24.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="50"> (a) cake.jpg (b) kite.png (c) A red kite (d) map.png -
25.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Banana</li>
<li>Orange</li>
<li>Litchi</li>
<li>Papaya</li>
</ul> - 26.True or false: HTML on its own can make bullet lists. (a) False (b) True
- 27.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <p> (d) <ol>
- 28.📄 Can HTML on its own make a form? (a) Yes (b) No
- 29.Which of these has a closing tag? (a) <hr> (b) <br> (c) <li> (d) <input>
- 30.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) </html> (b) <!DOCTYPE html>
- 31.Which of these is true of a web server? (a) shows line numbers (b) hosts websites online (c) colours code to help us (d) turns HTML into a page
- 32.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as a new line (d) as one space
- 33.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
- 34.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 35.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) <\h1> (c) </h1> (d) <h1>
-
36.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) body (c) Cricket Club (d) Welcome! - 37.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 38.True or false: <ol> lists steps in order. (a) True (b) False
- 39.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
40.🔗 Which address opens when you click this link?
<a href="about.html">Maths fun</a> (a) contact.html (b) https://example.com (c) Maths fun (d) about.html
Answer key
- <html>
- 6
- <h6>
- turns HTML into a page
- <ul>
- a web server
- 4
- True
- 1
- No
- on the browser tab
- True
- 4
- Rain today
- 2
- in the head
- <!DOCTYPE html>
- False
- <!DOCTYPE html>
- numbers
- element
- Yes
- a closing tag
- kite.png
- 5
- True
- <li>
- Yes
- <li>
- <!DOCTYPE html>
- hosts websites online
- as one space
- <!--
- Yes
- </h1>
- Welcome!
- an empty tag
- True
- an empty tag
- about.html
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids