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 basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) <head> (c) </body> (d) </html>
-
2.🔍 One closing tag is missing. Which one?
<h1>My pets</h1>
<b>The red kite
<strong>Our school trip</strong> (a) </h2> (b) </h1> (c) </strong> (d) </b> - 3.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 4.Which of these is an opening tag? (a) </body> (b) </li> (c) </p> (d) <title>
- 5.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h5>? (a) <h6> (b) <h3> (c) <h5> (d) <h1>
-
6.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h2>My best friend</h2>
<h4>My best friend</h4>
<p>Fun facts</p> -
7.🔍 Which line is missing its closing tag?
line 1: <h3>Cricket is fun.</h3>
line 2: <em>Hello, world!
line 3: <strong>I love mangoes.</strong> (a) line 3 (b) line 1 (c) line 2 - 8.Which of these has a closing tag? (a) <p> (b) <input> (c) <img> (d) <meta>
- 9.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 10.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
- 11.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) has an address bar (d) hosts websites online
- 12.True or false: <b> is an empty tag. (a) True (b) False
-
13.📋 What number does the browser show next to “Grapes”?
<ol start="2">
<li>Papaya</li>
<li>Grapes</li>
<li>Banana</li>
</ol> -
14.🔗 Which address opens when you click this link?
<a href="contact.html">School news</a> (a) maths.html (b) contact.html (c) School news (d) https://example.com -
15.📋 What number does the browser show next to “Guava”?
<ol start="2">
<li>Banana</li>
<li>Jamun</li>
<li>Guava</li>
<li>Orange</li>
</ol> -
16.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="50"> (a) fort.jpg (b) bus.jpg (c) tiger.jpg (d) Our school bus -
17.🔗 Which address opens when you click this link?
<a href="art.html">About us</a> (a) news.html (b) art.html (c) quiz.html (d) About us - 18.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <h3> (d) <p>
-
19.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) https://example.com (b) href (c) About us (d) Play games - 20.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <img> (d) <a>
- 21.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
- 22.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
- 23.Which of these is a closing tag? (a) <body> (b) </li> (c) <p> (d) <title>
- 24.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h4> or <h2>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
- 25.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h1>
- 26.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
-
27.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h4>Our school trip</h4>
<p>I love mangoes.</p> -
28.🔗 Where does this link open?
<a href="games.html" target="_blank">Visit the site</a> (a) in the same tab (b) in a new tab - 29.Which of these is a closing tag? (a) </body> (b) <b> (c) <li> (d) <title>
-
30.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Rain today</p>
<!-- <p>The red kite</p> -->
<!-- <p>Fun facts</p> -->
<!-- <p>Cricket is fun.</p> --> - 31.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <ul> (c) <meta charset="utf-8"> (d) <style>
- 32.Which of these is true of a web server? (a) shows line numbers (b) shows pages from the web (c) stores a website’s files (d) colours code to help us
- 33.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h6>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
- 34.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a src="about.html">
- 35.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) in a big heading (d) on the browser tab
- 36.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h4>? (a) <h4> (b) <h6> (c) <h2> (d) <h3>
- 37.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 38.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 39.True or false: <img> goes in the body. (a) False (b) True
-
40.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p>
<p>My pets</p>
<!-- <p>Hello, world!</p> -->
Answer key
- </html>
- </b>
- Yes
- <title>
- <h6>
- 3
- line 2
- <p>
- Yes
- Yes
- hosts websites online
- False
- 3
- contact.html
- 4
- bus.jpg
- art.html
- <h6>
- Play games
- <img>
- src
- -->
- </li>
- <h6>
- <h5>
- href
- 2
- in a new tab
- </body>
- 1
- <ul>
- stores a website’s files
- <h1>
- <a href="about.html">
- on the browser tab
- <h6>
- in the head
- a closing tag
- True
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids