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 words do you click on?
<a href="maths.html">School news</a> (a) href (b) School news (c) maths.html (d) Take the quiz -
2.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Cricket is fun.</p> -->
<p>Hello, world!</p> (a) Cricket is fun. (b) I love mangoes. (c) Hello, world! - 3.Which of these has a closing tag? (a) <h1> (b) <img> (c) <br> (d) <input>
- 4.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h4>? (a) <h1> (b) <h3> (c) <h6> (d) <h4>
- 5.Which of these is an empty tag? (a) <hr> (b) <p> (c) <title> (d) <ul>
- 6.Which of these has a closing tag? (a) <br> (b) <hr> (c) <p> (d) <input>
-
7.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow<br>Sky is blue</p> - 8.True or false: <ol> lists things in any order. (a) True (b) False
- 9.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
-
10.🔗 Which words do you click on?
<a href="quiz.html">Visit the site</a> (a) href (b) Maths fun (c) quiz.html (d) Visit the site - 11.🔍 Which is the odd one out? (a) saves our .html files (b) shows pages from the web (c) turns HTML into a page (d) has an address bar
-
12.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Grapes</li>
<li>Jamun</li>
<li>Litchi</li>
</ol> - 13.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) </strong> (c) <\strong> (d) <strong>
- 14.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 3 (d) 10
- 15.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </body> (c) <html> (d) <head>
-
16.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> - 17.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
-
18.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Our school trip</p>
<h2>Good morning!</h2>
<p>Rain today</p>
<p>My pets</p>
<p>Fun facts</p> - 19.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) answers page requests (d) colours code to help us
- 20.True or false: <img> has a closing tag. (a) True (b) False
- 21.Which of these is an opening tag? (a) </h1> (b) </title> (c) </body> (d) <title>
-
22.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="50"> (a) moon.png (b) width (c) The full moon (d) Our school bus -
23.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Mango</li>
<li>Jamun</li>
<li>Grapes</li>
</ul> -
24.🔍 Which line is missing its closing tag?
line 1: <u>My best friend</u>
line 2: <b>Our school trip
line 3: <h3>Fun facts</h3> (a) line 2 (b) line 3 (c) line 1 -
25.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Our school trip</p>
<p>My pets</p> (a) My pets (b) Hello, world! (c) Our school trip -
26.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>My best friend</p>
<!-- <p>Cricket is fun.</p> --> (a) My best friend (b) Cricket is fun. (c) The red kite -
27.🔠 How many headings are in this code?
<h1>My pets</h1>
<h3>Good morning!</h3>
<p>Good morning!</p>
<h2>The red kite</h2> - 28.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
29.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) contact.html (b) About us (c) Play games (d) href - 30.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
31.🔗 Which address opens when you click this link?
<a href="contact.html">Visit the site</a> (a) contact.html (b) Visit the site (c) maths.html (d) https://example.com -
32.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Litchi</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers - 33.🔢 In a basic web page file, which comes first: “<body>” or “</html>”? (a) <body> (b) </html>
-
34.🔍 Which line is missing its closing tag?
line 1: <i>Rain today
line 2: <h1>My pets</h1>
line 3: <em>Hello, world!</em> (a) line 3 (b) line 1 (c) line 2 - 35.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) src (d) href
- 36.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
- 37.Which of these is an opening tag? (a) </b> (b) </h1> (c) <p> (d) </title>
- 38.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
- 39.Which of these is a closing tag? (a) <b> (b) <title> (c) <h1> (d) </h1>
-
40.🔍 Which line is missing its closing tag?
line 1: <strong>Hello, world!</strong>
line 2: <em>I love mangoes.</em>
line 3: <h2>My pets (a) line 2 (b) line 1 (c) line 3
Answer key
- School news
- Cricket is fun.
- <h1>
- <h6>
- <hr>
- <p>
- 3
- False
- a slash /
- Visit the site
- saves our .html files
- 2
- </strong>
- 6
- <!DOCTYPE html>
- 350
- <h5>
- 5
- answers page requests
- False
- <title>
- The full moon
- 4
- line 2
- Hello, world!
- Cricket is fun.
- 3
- Yes
- Play games
- No
- contact.html
- bullets
- <body>
- line 1
- href
- <a>
- <p>
- True
- </h1>
- line 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids