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.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
- 2.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) makes it blank (d) opens it in a new tab
-
3.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Maths fun</a> (a) in the same tab (b) in a new tab -
4.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) width (b) A tiger asleep (c) A red kite (d) tiger.jpg -
5.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) body (b) Welcome! (c) Try this poha. (d) Riya’s Recipes - 6.True or false: HTML on its own cannot make links to pages. (a) False (b) True
- 7.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <!DOCTYPE html> (c) </body> (d) <html>
- 8.True or false: <ul> goes inside ul or ol. (a) True (b) False
-
9.🔗 Which address opens when you click this link?
<a href="quiz.html">About us</a> (a) About us (b) quiz.html (c) games.html (d) about.html -
10.🔗 Which words do you click on?
<a href="art.html">School news</a> (a) Take the quiz (b) School news (c) art.html (d) href -
11.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Fun facts</p> -->
<p>My pets</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Hello, world!</p> --> -
12.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Good morning!</p> -->
<p>Our school trip</p> - 13.True or false: a code editor shows pages from the web. (a) False (b) True
-
14.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> -
15.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>Mars is red.</p>
</body>
</html> (a) body (b) Match report (c) Mars is red. (d) Riya’s Recipes - 16.💬 Does the browser show comments on the page? (a) Yes (b) No
- 17.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <li> (d) <p>
-
18.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) Space Facts (c) index.html (d) Welcome! -
19.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Litchi</li>
<li>Orange</li>
<li>Banana</li>
</ol> - 20.🔢 In a basic web page file, which comes first: “<html>” or “</body>”? (a) <html> (b) </body>
-
21.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Cricket is fun.</p>
<h2>My pets</h2>
<p>I love mangoes.</p>
<p>Good morning!</p> -
22.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>My best friend</p>
<p>The red kite</p> (a) The red kite (b) My best friend (c) Fun facts - 23.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 24.🔍 Which is the odd one out? (a) shows pages from the web (b) has an address bar (c) opens web pages for us (d) colours code to help us
-
25.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="200"> (a) Map of India (b) Birthday cake (c) map.png (d) width - 26.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h4> (d) <h2>
-
27.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine</p> -
28.🔗 Which address opens when you click this link?
<a href="about.html">School news</a> (a) https://example.com (b) contact.html (c) School news (d) about.html -
29.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Our school trip</p>
<!-- <p>Rain today</p> --> - 30.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
-
31.🔗 Where does this link open?
<a href="games.html" target="_blank">Maths fun</a> (a) in the same tab (b) in a new tab - 32.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
- 33.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 34.True or false: in <img>, alt sets how tall it is. (a) True (b) False
- 35.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) an attribute (d) a comment
-
36.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>My pets</p> -->
<p>Rain today</p> (a) Rain today (b) My pets (c) My best friend - 37.🏷️ Which is the closing tag for <em>? (a) <em/> (b) </em> (c) <em> (d) <\em>
-
38.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="350"> (a) cake.jpg (b) A happy dog (c) width (d) Birthday cake - 39.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 40.Which of these is true of a web browser? (a) answers page requests (b) has an address bar (c) shows line numbers (d) saves our .html files
Answer key
- on the browser tab
- opens it in a new tab
- in a new tab
- A tiger asleep
- Welcome!
- False
- <!DOCTYPE html>
- False
- quiz.html
- School news
- 1
- 2
- False
- 300
- Match report
- No
- <li>
- Space Facts
- 4
- <html>
- 4
- Fun facts
- an opening tag
- colours code to help us
- Map of India
- <h2>
- 2
- about.html
- 2
- in the body
- in a new tab
- <h1>
- has a closing tag
- False
- an attribute
- My pets
- </em>
- Birthday cake
- has a closing tag
- has an address bar
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids