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 of these is an opening tag? (a) <p> (b) </b> (c) </h1> (d) </p>
-
2.📋 What number does the browser show next to “Litchi”?
<ol start="2">
<li>Banana</li>
<li>Litchi</li>
<li>Mango</li>
<li>Guava</li>
<li>Jamun</li>
</ol> - 3.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
-
4.📋 What number does the browser show next to “Mango”?
<ol start="9">
<li>Orange</li>
<li>Mango</li>
<li>Banana</li>
<li>Papaya</li>
<li>Grapes</li>
</ol> - 5.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
6.🔗 Which address opens when you click this link?
<a href="about.html">About us</a> (a) About us (b) contact.html (c) https://example.com (d) about.html - 7.🔍 Which is the odd one out? (a) turns HTML into a page (b) is where we type code (c) opens web pages for us (d) shows pages from the web
-
8.🔗 Which words do you click on?
<a href="art.html">About us</a> (a) art.html (b) href (c) About us (d) Contact us -
9.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="200"> (a) A happy dog (b) dog.jpg (c) moon.png (d) bus.jpg - 10.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) < (d) {
- 11.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
- 12.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the title (d) the body
- 13.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
-
14.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine<br>Kites fly high</p> -
15.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>My pets</p>
<h2>Hello, world!</h2>
<p>My pets</p>
<p>My pets</p>
<p>My pets</p> - 16.🔍 Which is the odd one out? (a) shows pages from the web (b) saves our .html files (c) turns HTML into a page (d) opens web pages for us
- 17.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
- 18.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 19.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
- 20.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) attribute (d) editor
-
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="100"> (a) width (b) A red kite (c) kite.png (d) Map of India -
22.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>Rain today</p>
<h2>Rain today</h2> - 23.💬 How does an HTML comment start? (a) // (b) /* (c) # (d) <!--
-
24.🔗 Which words do you click on?
<a href="games.html">School news</a> (a) games.html (b) Take the quiz (c) href (d) School news -
25.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h2>Cricket is fun.</h2>
<p>My best friend</p> - 26.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) width (d) src
- 27.True or false: <li> is one item of a list. (a) False (b) True
-
28.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) body (c) Easy snacks (d) My Hobbies -
29.🔗 Which address opens when you click this link?
<a href="contact.html">Maths fun</a> (a) maths.html (b) https://example.com (c) contact.html (d) Maths fun - 30.Which of these is an opening tag? (a) <h1> (b) </p> (c) </h1> (d) </body>
- 31.True or false: <br> has a closing tag. (a) True (b) False
- 32.Which of these is an empty tag? (a) <li> (b) <b> (c) <meta> (d) <p>
- 33.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h1> or <h2>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
- 34.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
35.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue<br>Birds sing<br>Roses are red<br>Rivers flow</p> -
36.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Hello, world!</p>
<p>Good morning!</p>
<h2>The red kite</h2>
<p>The red kite</p> -
37.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p>
<p>Fun facts</p>
<p>The red kite</p>
<!-- <p>My pets</p> --> -
38.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="150"> - 39.📄 Can HTML on its own make links to pages? (a) No (b) Yes
-
40.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>Fun facts</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Our school trip</p>
<p>I love mangoes.</p>
Answer key
- <p>
- 3
- <h6>
- 10
- an empty tag
- about.html
- is where we type code
- About us
- dog.jpg
- <
- <li>
- the body
- a code editor
- 3
- 5
- saves our .html files
- <ol>
- a closing tag
- to leave notes
- element
- A red kite
- 2
- <!--
- School news
- 2
- alt
- True
- Easy snacks
- contact.html
- <h1>
- False
- <meta>
- <h6>
- Yes
- 5
- 4
- 3
- 150
- Yes
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids