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.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="300"> (a) map.png (b) Map of India (c) width (d) Birthday cake -
2.🔍 Which line is missing its closing tag?
line 1: <h3>Our school trip</h3>
line 2: <h2>Fun facts</h2>
line 3: <strong>Rain today (a) line 3 (b) line 1 (c) line 2 -
3.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="400"> (a) width (b) cake.jpg (c) Birthday cake (d) A happy dog - 4.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h5> or <h2>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
- 5.Which of these is true of a web server? (a) has an address bar (b) turns HTML into a page (c) hosts websites online (d) opens web pages for us
- 6.Which of these is true of a web browser? (a) shows line numbers (b) shows pages from the web (c) hosts websites online (d) is where we type code
-
7.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>I love mangoes.</p>
<p>The red kite</p>
<p>Rain today</p> -
8.🔗 Which words do you click on?
<a href="maths.html">Contact us</a> (a) Visit the site (b) href (c) maths.html (d) Contact us -
9.🔗 Which words do you click on?
<a href="quiz.html">About us</a> (a) Contact us (b) quiz.html (c) href (d) About us - 10.🔢 In a basic web page file, which comes first: “</body>” or “</html>”? (a) </html> (b) </body>
-
11.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Papaya</li>
<li>Mango</li>
</ul> (a) numbers (b) bullets -
12.📋 What number does the browser show next to “Papaya”?
<ol start="3">
<li>Guava</li>
<li>Litchi</li>
<li>Papaya</li>
</ol> - 13.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) opens it in a new tab (d) makes it bold
-
14.📋 What number does the browser show next to “Litchi”?
<ol start="6">
<li>Orange</li>
<li>Jamun</li>
<li>Mango</li>
<li>Litchi</li>
<li>Grapes</li>
<li>Papaya</li>
</ol> -
15.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Good morning!</h2>
<h2>Hello, world!</h2> -
16.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Guava</li>
<li>Jamun</li>
<li>Orange</li>
<li>Litchi</li>
<li>Papaya</li>
<li>Mango</li>
</ol> -
17.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) A happy dog (b) moon.png (c) dog.jpg (d) bus.jpg - 18.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 19.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
- 20.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
- 21.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
-
22.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p>
<p>The red kite</p> -
23.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p> - 24.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
- 25.Which of these goes in the head? (a) <table> (b) <style> (c) <a> (d) <img>
- 26.💬 Does the browser show comments on the page? (a) Yes (b) No
- 27.Which of these goes in the body? (a) <style> (b) <title> (c) <meta charset="utf-8"> (d) <h1>
- 28.Which of these is true of a web browser? (a) opens web pages for us (b) answers page requests (c) colours code to help us (d) stores a website’s files
-
29.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>My drawings</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) body (b) My drawings (c) Cricket Club (d) We won by 5 runs. -
30.🔗 Which words do you click on?
<a href="about.html">Maths fun</a> (a) Maths fun (b) Art corner (c) href (d) about.html - 31.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
32.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Fun facts</p>
<p>My best friend</p>
<h4>Hello, world!</h4>
<p>My pets</p> - 33.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h5>? (a) <h1> (b) <h5> (c) <h6> (d) <h4>
-
34.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Orange</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Mango</li>
</ul> - 35.Which of these is true of a code editor? (a) turns HTML into a page (b) sends pages over the net (c) saves our .html files (d) stores a website’s files
-
36.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Hello, world!</p>
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> --> (a) Hello, world! (b) Fun facts (c) Good morning! (d) I love mangoes. -
37.🔍 One closing tag is missing. Which one?
<h3>The red kite
<em>Our school trip</em>
<p>I love mangoes.</p> (a) </em> (b) </p> (c) </h3> (d) </u> - 38.True or false: <p> goes in the body. (a) True (b) False
- 39.True or false: in <img>, height sets how tall it is. (a) False (b) True
- 40.📄 Can HTML on its own make a form? (a) No (b) Yes
Answer key
- Map of India
- line 3
- Birthday cake
- <h1>
- hosts websites online
- shows pages from the web
- 1
- Contact us
- About us
- </body>
- bullets
- 5
- opens it in a new tab
- 9
- 1
- 5
- dog.jpg
- Yes
- to leave notes
- 6
- a web browser
- 2
- 1
- href
- <style>
- No
- <h1>
- opens web pages for us
- My drawings
- Maths fun
- a closing tag
- 2
- <h6>
- 6
- saves our .html files
- Fun facts
- </h3>
- True
- True
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids