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 picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) tiger.jpg (b) map.png (c) kite.png (d) A tiger asleep -
2.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>My best friend</p>
<!-- <p>Rain today</p> --> (a) Cricket is fun. (b) My best friend (c) Rain today -
3.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>Rain today</p> -->
<p>Our school trip</p> (a) Good morning! (b) Rain today (c) Our school trip -
4.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Mango</li>
<li>Jamun</li>
<li>Banana</li>
<li>Grapes</li>
<li>Guava</li>
</ol> -
5.🔍 Which line is missing its closing tag?
line 1: <h1>I love mangoes.</h1>
line 2: <small>Rain today</small>
line 3: <b>My best friend (a) line 1 (b) line 3 (c) line 2 - 6.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank
-
7.📋 What number does the browser show next to “Jamun”?
<ol start="2">
<li>Papaya</li>
<li>Mango</li>
<li>Jamun</li>
<li>Banana</li>
</ol> - 8.Which of these is true of a web browser? (a) has an address bar (b) shows line numbers (c) sends pages over the net (d) is where we type code
- 9.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h1>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
-
10.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Cricket is fun.</h2>
<h2>Good morning!</h2>
<h2>My best friend</h2> -
11.🔗 Which address opens when you click this link?
<a href="contact.html">Maths fun</a> (a) maths.html (b) contact.html (c) Maths fun (d) https://example.com - 12.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <body> (c) <!DOCTYPE html> (d) </head>
- 13.📄 Can HTML on its own make links to pages? (a) Yes (b) No
- 14.🔢 In a basic web page file, which comes first: “</head>” or “</html>”? (a) </html> (b) </head>
-
15.🔗 Which words do you click on?
<a href="https://example.com">Take the quiz</a> (a) href (b) Play games (c) https://example.com (d) Take the quiz - 16.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h2> or <h4>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
- 17.📝 What does <hr> draw? (a) a picture (b) a table (c) a link (d) a line across the page
-
18.🔗 Which words do you click on?
<a href="maths.html">Play games</a> (a) href (b) About us (c) Play games (d) maths.html - 19.🏷️ Which is the closing tag for <em>? (a) <em/> (b) <em> (c) </em> (d) <\em>
-
20.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Our school trip</p>
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p> (a) Our school trip (b) Good morning! (c) Rain today (d) Cricket is fun. - 21.💬 Does the browser show comments on the page? (a) Yes (b) No
-
22.🔍 Which line is missing its closing tag?
line 1: <h2>I love mangoes.</h2>
line 2: <strong>My pets</strong>
line 3: <h3>Good morning! (a) line 3 (b) line 2 (c) line 1 -
23.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="200"> (a) Map of India (b) width (c) kite.png (d) A red kite - 24.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 25.Which of these goes in the head? (a) <title> (b) <table> (c) <img> (d) <ul>
-
26.📄 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) Riya’s Recipes (b) Welcome! (c) body (d) Try this poha. -
27.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>My best friend</p>
<h2>Hello, world!</h2> -
28.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>Here is my best one.</p>
</body>
</html> (a) index.html (b) Here is my best one. (c) Riya’s Recipes (d) Match report - 29.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
- 30.🔢 In a basic web page file, which comes LAST? (a) <body> (b) </head> (c) </html> (d) <!DOCTYPE html>
-
31.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 32.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to add colour (d) to show pictures
- 33.📄 Can HTML on its own make a form? (a) No (b) Yes
- 34.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) element (d) attribute
- 35.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
- 36.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to make it bigger (d) to describe the image
- 37.📄 Can HTML on its own run a game loop? (a) Yes (b) No
- 38.Which of these has a closing tag? (a) <title> (b) <img> (c) <hr> (d) <br>
-
39.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Rain today</p> -->
<p>Good morning!</p> (a) Rain today (b) Good morning! (c) I love mangoes. -
40.🔗 Which words do you click on?
<a href="https://example.com">Art corner</a> (a) School news (b) href (c) https://example.com (d) Art corner
Answer key
- tiger.jpg
- Rain today
- Rain today
- 4
- line 3
- opens it in a new tab
- 4
- has an address bar
- <h6>
- 1
- contact.html
- <!DOCTYPE html>
- Yes
- </head>
- Take the quiz
- <h6>
- a line across the page
- Play games
- </em>
- Rain today
- No
- line 3
- A red kite
- a closing tag
- <title>
- Welcome!
- 2
- Riya’s Recipes
- <ol>
- </html>
- in a new tab
- to leave notes
- Yes
- element
- in the body
- to describe the image
- No
- <title>
- Rain today
- Art corner
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids