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.🏷️ HTML marks up text using ___. (a) pixels (b) keys (c) tags (d) wires
- 2.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h1> or <h4>? (a) <h5> (b) <h6> (c) <h4> (d) <h1>
- 3.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <!DOCTYPE html> (d) <html>
-
4.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="300"> (a) dog.jpg (b) cake.jpg (c) Birthday cake (d) moon.png - 5.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <h3> (c) <\h3> (d) </h3>
-
6.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="50"> -
7.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p>
<p>Cricket is fun.</p>
<p>My best friend</p> (a) I love mangoes. (b) The red kite (c) Cricket is fun. (d) My best friend -
8.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>My pets</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p> - 9.True or false: <ul> goes inside ul or ol. (a) False (b) True
- 10.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h6>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
- 11.Which of these is a closing tag? (a) <li> (b) </h1> (c) <title> (d) <h1>
- 12.True or false: HTML on its own can make headings. (a) True (b) False
- 13.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
-
14.🔍 One closing tag is missing. Which one?
<h2>I love mangoes.</h2>
<h3>My best friend</h3>
<h1>Good morning! (a) </h2> (b) </h1> (c) </p> (d) </h3> - 15.💬 Does the browser show comments on the page? (a) Yes (b) No
-
16.🔗 Which words do you click on?
<a href="games.html">Maths fun</a> (a) Maths fun (b) Art corner (c) href (d) games.html - 17.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h3>? (a) <h3> (b) <h1> (c) <h5> (d) <h4>
-
18.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) My Hobbies (c) index.html (d) All about me -
19.🔗 Which words do you click on?
<a href="https://example.com">Visit the site</a> (a) Maths fun (b) Visit the site (c) https://example.com (d) href -
20.🔗 Which words do you click on?
<a href="art.html">Play games</a> (a) Play games (b) art.html (c) href (d) About us - 21.True or false: in <img>, alt shows if the image fails. (a) True (b) False
-
22.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>Our school trip</p>
<p>The red kite</p>
<!-- <p>My best friend</p> --> - 23.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) src (c) width (d) alt
- 24.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h3> or <h5>? (a) <h5> (b) <h4> (c) <h6> (d) <h3>
- 25.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>
-
26.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> (a) tiger.jpg (b) A red kite (c) width (d) A tiger asleep - 27.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
- 28.🔢 In a basic web page file, which comes first: “<head>” or “<html>”? (a) <html> (b) <head>
-
29.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Orange</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Guava</li>
</ol> - 30.🔗 What does HyperText mean? (a) text with links (b) secret text (c) text in colour (d) very big text
- 31.📄 Can HTML on its own keep a high score? (a) Yes (b) No
-
32.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>I love mangoes.</p>
<!-- <p>My pets</p> -->
<!-- <p>Good morning!</p> -->
<p>My best friend</p> - 33.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
-
34.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Good morning!</p>
<h2>Cricket is fun.</h2> - 35.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) width (d) height
-
36.🔍 Which line is missing its closing tag?
line 1: <h1>My pets
line 2: <h2>My best friend</h2>
line 3: <i>Our school trip</i> (a) line 2 (b) line 3 (c) line 1 -
37.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p>
<p>My best friend</p>
<p>Good morning!</p> (a) Our school trip (b) Good morning! (c) Cricket is fun. (d) My best friend - 38.True or false: a web server shows line numbers. (a) True (b) False
-
39.🔗 Which address opens when you click this link?
<a href="https://example.com">Contact us</a> (a) maths.html (b) Contact us (c) https://example.com (d) art.html - 40.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) ( (d) <
Answer key
- tags
- <h6>
- <!DOCTYPE html>
- cake.jpg
- </h3>
- 50
- I love mangoes.
- 2
- False
- <h6>
- </h1>
- True
- True
- </h1>
- No
- Maths fun
- <h1>
- My Hobbies
- Visit the site
- Play games
- True
- 3
- height
- <h3>
- <h6>
- A tiger asleep
- opens it in a new tab
- <html>
- 4
- text with links
- No
- 3
- 6
- 2
- alt
- line 1
- Our school trip
- False
- https://example.com
- <
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids