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.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>The red kite</p>
<p>Hello, world!</p>
<p>Rain today</p> (a) My pets (b) The red kite (c) Rain today (d) Hello, world! -
2.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Guava</li>
<li>Grapes</li>
<li>Banana</li>
</ul> - 3.Which of these has a closing tag? (a) <hr> (b) <img> (c) <br> (d) <ul>
-
4.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p> (a) My pets (b) Good morning! (c) Hello, world! - 5.🌐 Which one saves our .html files? (a) a web server (b) a web browser (c) a code editor
-
6.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) All about me (c) Riya’s Recipes (d) body - 7.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
8.🔗 Where does this link open?
<a href="news.html">Visit the site</a> (a) in the same tab (b) in a new tab - 9.True or false: HTML on its own cannot make a form. (a) True (b) False
- 10.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <title> (d) <table>
-
11.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="150"> (a) bus.jpg (b) moon.png (c) fort.jpg (d) The full moon - 12.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h6> or <h1>? (a) <h1> (b) <h6> (c) <h5> (d) <h3>
-
13.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>The red kite</h2>
<h2>I love mangoes.</h2>
<h2>My best friend</h2>
<p>The red kite</p>
<h2>My best friend</h2> - 14.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 15.🔗 Which attribute holds the address of a link? (a) href (b) id (c) alt (d) src
- 16.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <h1> (d) <style>
- 17.🔍 Which is the odd one out? (a) colours code to help us (b) saves our .html files (c) is where we type code (d) hosts websites online
- 18.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <h3> (d) <p>
-
19.🔗 Which words do you click on?
<a href="maths.html">Art corner</a> (a) Art corner (b) href (c) maths.html (d) School news - 20.Which of these is true of a web browser? (a) shows line numbers (b) answers page requests (c) saves our .html files (d) has an address bar
- 21.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
-
22.🔗 Which address opens when you click this link?
<a href="contact.html">About us</a> (a) About us (b) https://example.com (c) maths.html (d) contact.html - 23.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) ( (d) <
- 24.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
-
25.🔗 Which address opens when you click this link?
<a href="about.html">Art corner</a> (a) contact.html (b) about.html (c) Art corner (d) https://example.com -
26.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Rivers flow<br>Stars shine</p> -
27.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers - 28.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h4> or <h1>? (a) <h1> (b) <h4> (c) <h5> (d) <h2>
-
29.🔗 Where does this link open?
<a href="games.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 30.True or false: <input> has a closing tag. (a) True (b) False
- 31.🌐 Which one shows line numbers? (a) a web browser (b) a web server (c) a code editor
-
32.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>Fun facts</p>
<!-- <p>Rain today</p> --> - 33.True or false: <ol> is an unordered list. (a) False (b) True
- 34.🏷️ HTML marks up text using ___. (a) tags (b) keys (c) pixels (d) wires
-
35.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Our school trip</p> -->
<p>My pets</p> -
36.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h4>My best friend</h4>
<p>Good morning!</p>
<p>Cricket is fun.</p> - 37.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 38.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) address (d) editor
- 39.True or false: a web server stores a website’s files. (a) False (b) True
- 40.📝 What does <p> make? (a) a paragraph (b) a link (c) a table (d) a picture
Answer key
- My pets
- 4
- <ul>
- Good morning!
- a code editor
- All about me
- Yes
- in the same tab
- False
- <table>
- moon.png
- <h1>
- 2
- No
- href
- <h1>
- hosts websites online
- <h6>
- Art corner
- has an address bar
- <!--
- contact.html
- <
- in the body
- about.html
- 3
- bullets
- <h5>
- in a new tab
- False
- a code editor
- 3
- False
- tags
- 1
- 2
- an empty tag
- element
- True
- a paragraph
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids