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 one colours code to help us? (a) a web server (b) a code editor (c) a web browser
-
2.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>The red kite</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p> - 3.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
-
4.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Orange</li>
</ul> - 5.True or false: in <img>, src describes the picture. (a) False (b) True
- 6.Which of these is an empty tag? (a) <li> (b) <ul> (c) <p> (d) <br>
- 7.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) attribute (d) element
-
8.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Good morning!</p>
<!-- <p>My pets</p> --> - 9.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
- 10.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h6>? (a) <h5> (b) <h1> (c) <h6> (d) <h2>
-
11.🔗 Which address opens when you click this link?
<a href="maths.html">Art corner</a> (a) news.html (b) maths.html (c) Art corner (d) art.html - 12.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
- 13.Which of these is an opening tag? (a) </b> (b) </body> (c) </li> (d) <b>
- 14.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
- 15.True or false: <title> is an empty tag. (a) True (b) False
-
16.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Orange</li>
<li>Papaya</li>
</ul> - 17.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the doctype (d) the title
-
18.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="300"> - 19.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
-
20.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>The red kite</p>
<!-- <p>Hello, world!</p> --> - 21.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
- 22.True or false: <p> has a closing tag. (a) False (b) True
- 23.Which of these is an opening tag? (a) </body> (b) <title> (c) </b> (d) </title>
- 24.Which of these goes in the body? (a) <title> (b) <ul> (c) <link rel="stylesheet"> (d) <style>
- 25.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
- 26.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 27.True or false: a web browser turns HTML into a page. (a) False (b) True
- 28.Which of these is true of a code editor? (a) turns HTML into a page (b) has an address bar (c) opens web pages for us (d) colours code to help us
-
29.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>Good morning!</h2>
<p>My best friend</p> - 30.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h3> or <h1>? (a) <h5> (b) <h1> (c) <h3> (d) <h2>
-
31.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) index.html (b) Class 7 Blog (c) Try this poha. (d) All about me - 32.Which of these is an empty tag? (a) <ul> (b) <p> (c) <meta> (d) <h1>
-
33.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Rain today</p>
<!-- <p>Our school trip</p> -->
<p>Good morning!</p> (a) Rain today (b) Good morning! (c) My pets (d) Our school trip -
34.🔍 Which line is missing its closing tag?
line 1: <b>I love mangoes.
line 2: <h3>Hello, world!</h3>
line 3: <h1>Cricket is fun.</h1> (a) line 2 (b) line 3 (c) line 1 - 35.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
- 36.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
37.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>Fun facts</h2>
<p>I love mangoes.</p>
<p>My pets</p>
<p>Our school trip</p>
<p>My best friend</p> -
38.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="50"> -
39.🔗 Which words do you click on?
<a href="maths.html">Play games</a> (a) href (b) About us (c) Play games (d) maths.html -
40.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) body (b) Planets (c) Riya’s Recipes (d) I like to read.
Answer key
- a code editor
- 1
- 1
- 2
- False
- <br>
- element
- 1
- in the body
- <h6>
- maths.html
- 6
- <b>
- on the browser tab
- False
- 3
- the body
- 300
- <a href="about.html">
- 2
- <!--
- True
- <title>
- <ul>
- <ol>
- a closing tag
- True
- colours code to help us
- 2
- <h1>
- Class 7 Blog
- <meta>
- Our school trip
- line 1
- <a>
- an empty tag
- 5
- 50
- Play games
- Planets
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids