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.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
2.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) Play games (b) https://example.com (c) contact.html (d) maths.html - 3.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <img> (d) <a>
-
4.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) body (b) Space Facts (c) Welcome! (d) Mars is red. -
5.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Welcome! (b) index.html (c) Class 7 Blog (d) We won by 5 runs. - 6.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h5> or <h6>? (a) <h4> (b) <h6> (c) <h5> (d) <h2>
- 7.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h2>
- 8.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) makes it blank (d) hides the link
-
9.🔍 One closing tag is missing. Which one?
<strong>Hello, world!</strong>
<u>Good morning!
<p>I love mangoes.</p> (a) </p> (b) </strong> (c) </em> (d) </u> -
10.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<p>Fun facts</p>
<p>Good morning!</p> -
11.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) Art Gallery (b) body (c) Easy snacks (d) Try this poha. - 12.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the doctype (d) the title
-
13.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Fun facts</p>
<p>Cricket is fun.</p>
<h3>The red kite</h3> -
14.🔍 Which line is missing its closing tag?
line 1: <b>Hello, world!</b>
line 2: <small>Rain today</small>
line 3: <p>The red kite (a) line 1 (b) line 2 (c) line 3 -
15.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="100"> (a) Birthday cake (b) dog.jpg (c) cake.jpg (d) moon.png -
16.🔍 Which line is missing its closing tag?
line 1: <b>My pets</b>
line 2: <em>Fun facts
line 3: <p>Good morning!</p> (a) line 1 (b) line 2 (c) line 3 -
17.🔗 Which words do you click on?
<a href="quiz.html">About us</a> (a) Contact us (b) About us (c) href (d) quiz.html - 18.🔍 Which is the odd one out? (a) turns HTML into a page (b) stores a website’s files (c) answers page requests (d) hosts websites online
- 19.🌐 Which one stores a website’s files? (a) a web server (b) a web browser (c) a code editor
- 20.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to colour it (d) to load it faster
- 21.Which of these is true of a code editor? (a) turns HTML into a page (b) hosts websites online (c) shows pages from the web (d) shows line numbers
-
22.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Jamun</li>
</ol> - 23.📋 Which list tag is an ordered list? (a) <ol> (b) <li> (c) <ul>
-
24.🔍 Which line is missing its closing tag?
line 1: <small>I love mangoes.
line 2: <h3>Hello, world!</h3>
line 3: <strong>The red kite</strong> (a) line 3 (b) line 2 (c) line 1 - 25.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
- 26.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 6 (d) 10
- 27.True or false: a web browser stores a website’s files. (a) True (b) False
-
28.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Jamun</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Mango</li>
</ol> -
29.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) A red kite (b) tiger.jpg (c) A tiger asleep (d) width - 30.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
-
31.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Match report</h1>
<p>Here is my best one.</p>
</body>
</html> (a) body (b) My Hobbies (c) Match report (d) Here is my best one. - 32.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h2>? (a) <h4> (b) <h6> (c) <h2> (d) <h5>
-
33.🔍 Which line is missing its closing tag?
line 1: <strong>The red kite</strong>
line 2: <h3>Fun facts</h3>
line 3: <b>My pets (a) line 3 (b) line 2 (c) line 1 -
34.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>My best friend</p> -->
<p>Rain today</p> (a) Rain today (b) Our school trip (c) My best friend -
35.🔍 One closing tag is missing. Which one?
<h2>Our school trip</h2>
<u>Good morning!</u>
<h3>My pets (a) </h3> (b) </h2> (c) </strong> (d) </u> - 36.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
37.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p>
<!-- <p>Fun facts</p> -->
<!-- <p>Our school trip</p> --> -
38.📋 What number does the browser show next to “Jamun”?
<ol start="9">
<li>Litchi</li>
<li>Jamun</li>
<li>Guava</li>
<li>Grapes</li>
<li>Banana</li>
</ol> -
39.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) body (b) Thanks for visiting. (c) Easy snacks (d) My Hobbies - 40.🖼️ Does <img> need a closing tag? (a) No (b) Yes
Answer key
- a closing tag
- contact.html
- <img>
- Welcome!
- Class 7 Blog
- <h6>
- <h1>
- opens it in a new tab
- </u>
- 4
- Easy snacks
- the body
- 2
- line 3
- cake.jpg
- line 2
- About us
- turns HTML into a page
- a web server
- to describe the image
- shows line numbers
- 2
- <ol>
- line 1
- <ul>
- 6
- False
- 2
- A tiger asleep
- to leave notes
- Match report
- <h2>
- line 3
- My best friend
- </h3>
- an empty tag
- 1
- 10
- Easy snacks
- No
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids