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.True or false: <ul> goes in the body. (a) True (b) False
-
2.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Litchi</li>
<li>Banana</li>
<li>Grapes</li>
<li>Guava</li>
<li>Jamun</li>
</ul> - 3.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h6> (d) <h3>
- 4.True or false: in <img>, src describes the picture. (a) True (b) False
- 5.🔗 Which attribute holds the address of a link? (a) src (b) href (c) id (d) alt
- 6.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
- 7.Which of these is an empty tag? (a) <meta> (b) <h1> (c) <li> (d) <b>
- 8.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a picture (d) a table
- 9.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the head (d) the doctype
-
10.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>Hello, world!</p> - 11.🔢 In a basic web page file, which comes first: “</head>” or “</body>”? (a) </body> (b) </head>
-
12.📋 What number does the browser show next to “Orange”?
<ol>
<li>Jamun</li>
<li>Orange</li>
<li>Litchi</li>
<li>Guava</li>
</ol> - 13.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it bold (d) makes it blank
- 14.💬 Does the browser show comments on the page? (a) No (b) Yes
- 15.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h6>? (a) <h6> (b) <h5> (c) <h1> (d) <h3>
- 16.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 17.📄 Can HTML on its own keep a high score? (a) Yes (b) No
-
18.🔗 Where does this link open?
<a href="games.html">About us</a> (a) in the same tab (b) in a new tab - 19.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
-
20.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>I love mangoes.</p> - 21.True or false: in <img>, width sets how wide it is. (a) True (b) False
-
22.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Roses are red<br>Rivers flow</p> - 23.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as one space (c) as a new line (d) as a dot
- 24.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 25.Which of these is an empty tag? (a) <ul> (b) <input> (c) <li> (d) <title>
-
26.🔗 Which words do you click on?
<a href="quiz.html">Take the quiz</a> (a) Take the quiz (b) quiz.html (c) Play games (d) href - 27.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an attribute (d) an element name
-
28.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>Rain today</p>
<!-- <p>My pets</p> --> - 29.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h5> or <h6>? (a) <h1> (b) <h4> (c) <h5> (d) <h6>
-
30.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Grapes</li>
</ol> (a) numbers (b) bullets - 31.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) width (d) height
- 32.🔍 Which is the odd one out? (a) has an address bar (b) hosts websites online (c) stores a website’s files (d) answers page requests
- 33.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
-
34.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p>
<p>The red kite</p> (a) Rain today (b) The red kite (c) Our school trip (d) I love mangoes. -
35.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>The red kite</p>
<p>Fun facts</p>
<p>Our school trip</p> (a) The red kite (b) Fun facts (c) Our school trip (d) My pets -
36.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) Easy snacks (c) index.html (d) Class 7 Blog - 37.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to add colour (d) to leave notes
-
38.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Planets</h1>
<p>Mars is red.</p>
</body>
</html> (a) Planets (b) Mars is red. (c) index.html (d) Class 7 Blog -
39.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Papaya</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets - 40.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
Answer key
- True
- 6
- <h6>
- False
- href
- <a>
- <meta>
- a line across the page
- the body
- 3
- </head>
- 2
- opens it in a new tab
- No
- <h6>
- an empty tag
- No
- in the same tab
- -->
- 4
- True
- 3
- as one space
- Yes
- <input>
- Take the quiz
- an attribute
- 2
- <h1>
- numbers
- alt
- has an address bar
- <ol>
- Rain today
- My pets
- Class 7 Blog
- to leave notes
- Class 7 Blog
- bullets
- an opening tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids