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.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
- 2.True or false: <ol> is an ordered list. (a) True (b) False
- 3.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1> (c) <\h1> (d) <h1/>
-
4.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="250"> - 5.Which of these is an opening tag? (a) </h1> (b) </title> (c) <b> (d) </p>
-
6.🔗 Where does this link open?
<a href="quiz.html">Contact us</a> (a) in the same tab (b) in a new tab -
7.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets -
8.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Good morning!</p>
<h3>I love mangoes.</h3>
<h2>The red kite</h2> -
9.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>My pets</p> -->
<p>Our school trip</p>
<p>I love mangoes.</p> - 10.Which of these is a closing tag? (a) <body> (b) <h1> (c) </p> (d) <li>
- 11.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
-
12.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Papaya</li>
<li>Grapes</li>
</ul> (a) numbers (b) bullets - 13.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h6> or <h3>? (a) <h6> (b) <h3> (c) <h2> (d) <h4>
-
14.🔗 Where does this link open?
<a href="about.html">Contact us</a> (a) in the same tab (b) in a new tab -
15.🔗 Which words do you click on?
<a href="games.html">Maths fun</a> (a) games.html (b) href (c) Maths fun (d) Art corner -
16.🔍 One closing tag is missing. Which one?
<p>Our school trip</p>
<em>Good morning!</em>
<b>Cricket is fun. (a) </h1> (b) </p> (c) </b> (d) </em> -
17.🔗 Where does this link open?
<a href="games.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab -
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> (a) A red kite (b) tiger.jpg (c) width (d) A tiger asleep - 19.True or false: a web browser answers page requests. (a) False (b) True
-
20.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>My best friend</h4>
<h3>Rain today</h3> -
21.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="300"> - 22.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
23.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="100"> (a) Map of India (b) kite.png (c) A red kite (d) width - 24.True or false: in <img>, src describes the picture. (a) True (b) False
- 25.🔢 In a basic web page file, which comes first: “<head>” or “</body>”? (a) <head> (b) </body>
- 26.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) < (d) {
- 27.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h1> or <h4>? (a) <h1> (b) <h4> (c) <h3> (d) <h5>
- 28.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
-
29.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="150"> (a) fort.jpg (b) An old fort (c) width (d) A tiger asleep - 30.🔗 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
-
31.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Rain today</p>
<p>I love mangoes.</p>
<p>Good morning!</p>
<!-- <p>Hello, world!</p> --> - 32.True or false: <b> has a closing tag. (a) False (b) True
-
33.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) Birthday cake (b) cake.jpg (c) width (d) A happy dog -
34.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>Our school trip</p> -->
<p>Hello, world!</p>
<p>Cricket is fun.</p> - 35.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <a> (d) <img>
-
36.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Fun facts</p>
<p>Hello, world!</p>
<p>My best friend</p> (a) Fun facts (b) Hello, world! (c) My best friend (d) My pets - 37.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) element (d) address
- 38.📝 What do we need to write HTML? (a) a paintbrush (b) a plain text editor (c) a printer (d) a microphone
-
39.🔗 Where does this link open?
<a href="https://example.com">School news</a> (a) in a new tab (b) in the same tab -
40.📋 What number does the browser show next to “Banana”?
<ol start="5">
<li>Grapes</li>
<li>Orange</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Banana</li>
<li>Jamun</li>
</ol>
Answer key
- to leave notes
- True
- </h1>
- 250
- <b>
- in the same tab
- bullets
- 3
- 2
- </p>
- a web browser
- bullets
- <h6>
- in the same tab
- Maths fun
- </b>
- in a new tab
- A tiger asleep
- False
- 3
- 300
- has a closing tag
- A red kite
- False
- <head>
- <
- <h5>
- <ul>
- An old fort
- opens it in a new tab
- 3
- True
- Birthday cake
- 3
- <a>
- My pets
- element
- a plain text editor
- in the same tab
- 9
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids