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.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a closing tag (d) a comment
-
2.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Guava</li>
<li>Mango</li>
</ul> -
3.📋 What number does the browser show next to “Jamun”?
<ol start="5">
<li>Guava</li>
<li>Mango</li>
<li>Banana</li>
<li>Jamun</li>
<li>Grapes</li>
</ol> - 4.Which of these is an opening tag? (a) </body> (b) </h1> (c) <h1> (d) </p>
-
5.🔗 Which address opens when you click this link?
<a href="https://example.com">About us</a> (a) maths.html (b) https://example.com (c) art.html (d) About us - 6.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
- 7.Which of these is true of a code editor? (a) answers page requests (b) sends pages over the net (c) shows pages from the web (d) shows line numbers
- 8.🏷️ HTML marks up text using ___. (a) keys (b) pixels (c) wires (d) tags
-
9.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h4>My pets</h4>
<p>Cricket is fun.</p> - 10.Which of these goes in the head? (a) <a> (b) <table> (c) <h1> (d) <title>
-
11.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="350"> (a) Map of India (b) kite.png (c) A red kite (d) width - 12.True or false: in <img>, src sets how tall it is. (a) False (b) True
- 13.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
-
14.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Easy snacks (b) Here is my best one. (c) body (d) Space Facts -
15.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>Rain today</p> -->
<p>My pets</p> (a) My pets (b) Good morning! (c) Rain today - 16.Which of these is true of a web server? (a) is where we type code (b) shows pages from the web (c) turns HTML into a page (d) stores a website’s files
- 17.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h6>? (a) <h2> (b) <h6> (c) <h3> (d) <h4>
- 18.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
-
19.🔗 Which address opens when you click this link?
<a href="games.html">School news</a> (a) contact.html (b) School news (c) games.html (d) about.html - 20.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
-
21.🔍 One closing tag is missing. Which one?
<em>Our school trip
<b>My best friend</b>
<h2>I love mangoes.</h2> (a) </h2> (b) </h1> (c) </b> (d) </em> - 22.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <style> (d) <ul>
- 23.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
24.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Roses are red<br>Rivers flow<br>Sky is blue</p> - 25.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <ol> (d) <li>
-
26.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) Contact us (b) Visit the site (c) href (d) games.html -
27.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Jamun</li>
<li>Banana</li>
</ol> - 28.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
-
29.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Litchi</li>
<li>Banana</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Papaya</li>
</ol> - 30.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
-
31.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>My pets</p>
<p>Fun facts</p> - 32.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h6> or <h2>? (a) <h2> (b) <h6> (c) <h4> (d) <h1>
-
33.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue<br>Stars shine<br>Birds sing</p> - 34.💬 Does the browser show comments on the page? (a) No (b) Yes
- 35.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
- 36.🔍 Which is the odd one out? (a) turns HTML into a page (b) sends pages over the net (c) hosts websites online (d) stores a website’s files
- 37.True or false: in <img>, height shows if the image fails. (a) False (b) True
- 38.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h2> or <h5>? (a) <h2> (b) <h5> (c) <h1> (d) <h4>
-
39.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Our school trip</p>
<p>Fun facts</p> -
40.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) A red kite (b) A tiger asleep (c) width (d) tiger.jpg
Answer key
- an attribute
- 3
- 8
- <h1>
- https://example.com
- Yes
- shows line numbers
- tags
- 2
- <title>
- A red kite
- False
- opens it in a new tab
- Easy snacks
- Rain today
- stores a website’s files
- <h6>
- <a href="about.html">
- games.html
- 6
- </em>
- <ul>
- an empty tag
- 4
- <li>
- Contact us
- 3
- False
- 6
- <h1>
- 1
- <h6>
- 4
- No
- False
- turns HTML into a page
- False
- <h1>
- 2
- A tiger asleep
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids