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.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) { (d) [
- 2.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
- 3.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
-
4.📋 What number does the browser show next to “Orange”?
<ol start="9">
<li>Mango</li>
<li>Orange</li>
<li>Banana</li>
</ol> - 5.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
- 6.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
- 7.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 8.True or false: <title> has a closing tag. (a) True (b) False
-
9.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>Our school trip</p>
<p>Hello, world!</p> -
10.📋 What number does the browser show next to “Litchi”?
<ol start="3">
<li>Guava</li>
<li>Jamun</li>
<li>Banana</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Litchi</li>
</ol> -
11.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>My pets</h2>
<p>Hello, world!</p> - 12.True or false: in <img>, alt sets how tall it is. (a) False (b) True
-
13.🔗 Which address opens when you click this link?
<a href="about.html">Play games</a> (a) about.html (b) https://example.com (c) Play games (d) contact.html - 14.🏷️ Which is the closing tag for <p>? (a) <\p> (b) </p> (c) <p/> (d) <p>
-
15.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="400"> (a) bus.jpg (b) fort.jpg (c) moon.png (d) The full moon -
16.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing<br>Roses are red<br>Sky is blue<br>Stars shine</p> -
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) width (b) tiger.jpg (c) A tiger asleep (d) A red kite - 18.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 19.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <img> (c) <p> (d) <a>
-
20.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="200"> (a) dog.jpg (b) Map of India (c) cake.jpg (d) map.png -
21.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Hello, world!</p>
<p>Cricket is fun.</p> -
22.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Our school trip</p> -->
<!-- <p>My best friend</p> --> - 23.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
- 24.🔍 Which is the odd one out? (a) shows line numbers (b) has an address bar (c) saves our .html files (d) colours code to help us
-
25.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Rain today</p> -->
<!-- <p>I love mangoes.</p> --> - 26.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 27.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em/> (c) <em> (d) </em>
-
28.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Fun facts</p>
<!-- <p>My pets</p> --> (a) My pets (b) The red kite (c) Fun facts -
29.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="300"> (a) width (b) The full moon (c) Our school bus (d) moon.png - 30.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
- 31.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
-
32.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) body (b) Art Gallery (c) Thanks for visiting. (d) Welcome! - 33.True or false: a code editor opens web pages for us. (a) False (b) True
-
34.🔍 One closing tag is missing. Which one?
<p>Fun facts</p>
<b>Hello, world!</b>
<h2>My best friend (a) </b> (b) </h2> (c) </small> (d) </p> - 35.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
- 36.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
- 37.True or false: HTML on its own cannot make links to pages. (a) True (b) False
- 38.True or false: a web server is where we type code. (a) True (b) False
-
39.🔗 Which words do you click on?
<a href="games.html">Play games</a> (a) Play games (b) About us (c) games.html (d) href -
40.📄 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>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) body (c) All about me (d) Riya’s Recipes
Answer key
- <
- <a href="about.html">
- <a>
- 10
- a web browser
- <ul>
- an opening tag
- True
- 1
- 8
- 2
- False
- about.html
- </p>
- moon.png
- 5
- A tiger asleep
- an opening tag
- <img>
- map.png
- 1
- 1
- 1
- has an address bar
- 1
- a closing tag
- </em>
- My pets
- The full moon
- in the body
- href
- Welcome!
- False
- </h2>
- opens it in a new tab
- <ol>
- False
- False
- Play games
- All about me
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids