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.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
-
2.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="150"> (a) width (b) Our school bus (c) An old fort (d) bus.jpg - 3.True or false: HTML on its own can make bullet lists. (a) False (b) True
-
4.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>Good morning!</h2>
<h2>The red kite</h2>
<p>My best friend</p>
<h2>My pets</h2>
<h2>Cricket is fun.</h2> -
5.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Grapes</li>
<li>Mango</li>
<li>Orange</li>
<li>Papaya</li>
<li>Guava</li>
</ul> - 6.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em> (c) </em> (d) <em/>
- 7.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h2> or <h5>? (a) <h2> (b) <h5> (c) <h1> (d) <h4>
- 8.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to describe the image (d) to make it bigger
-
9.🔍 Which line is missing its closing tag?
line 1: <h3>Rain today</h3>
line 2: <p>My pets
line 3: <h2>Cricket is fun.</h2> (a) line 3 (b) line 1 (c) line 2 - 10.🔢 In a basic web page file, which comes first: “</body>” or “<html>”? (a) <html> (b) </body>
- 11.Which of these goes in the head? (a) <img> (b) <title> (c) <a> (d) <table>
-
12.🔗 Which address opens when you click this link?
<a href="quiz.html">About us</a> (a) About us (b) about.html (c) quiz.html (d) games.html -
13.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="50"> (a) fort.jpg (b) width (c) An old fort (d) A tiger asleep - 14.📄 Can HTML on its own make headings? (a) No (b) Yes
- 15.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
16.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Maths fun</a> (a) in the same tab (b) in a new tab -
17.🔍 One closing tag is missing. Which one?
<h1>I love mangoes.</h1>
<h3>Our school trip</h3>
<em>Cricket is fun. (a) </h1> (b) </h3> (c) </em> (d) </b> - 18.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h2> or <h5>? (a) <h5> (b) <h2> (c) <h4> (d) <h6>
- 19.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
-
20.🔠 How many headings are in this code?
<h1>My pets</h1>
<h3>The red kite</h3>
<h2>Good morning!</h2> -
21.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h3>Cricket is fun.</h3>
<h4>Hello, world!</h4> - 22.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
- 23.True or false: <b> has a closing tag. (a) False (b) True
-
24.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Our school trip</p>
<p>Fun facts</p> -
25.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Jamun</li>
<li>Banana</li>
<li>Mango</li>
<li>Orange</li>
<li>Papaya</li>
</ul> - 26.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 27.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
-
28.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Jamun</li>
<li>Litchi</li>
</ul> (a) bullets (b) numbers - 29.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
- 30.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>
- 31.Which of these is true of a web server? (a) is where we type code (b) shows line numbers (c) answers page requests (d) shows pages from the web
- 32.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 33.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h3> or <h5>? (a) <h3> (b) <h4> (c) <h5> (d) <h6>
-
34.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Rain today</p> -->
<p>Fun facts</p>
<p>Hello, world!</p> (a) My pets (b) Fun facts (c) Hello, world! (d) Rain today - 35.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as a new line (d) as 5 spaces
- 36.True or false: HTML on its own cannot run a game loop. (a) True (b) False
- 37.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dollar $ (d) a dot .
-
38.📋 What number does the browser show next to “Orange”?
<ol>
<li>Jamun</li>
<li>Orange</li>
<li>Banana</li>
<li>Litchi</li>
<li>Mango</li>
<li>Papaya</li>
</ol> - 39.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
40.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="100"> (a) moon.png (b) width (c) Our school bus (d) The full moon
Answer key
- <!--
- Our school bus
- True
- 2
- 6
- </em>
- <h1>
- to describe the image
- line 2
- <html>
- <title>
- quiz.html
- An old fort
- Yes
- an opening tag
- in a new tab
- </em>
- <h6>
- in the body
- 3
- 3
- in the head
- True
- 3
- 6
- Yes
- a code editor
- bullets
- <a>
- <ol>
- answers page requests
- in the head
- <h6>
- Rain today
- as one space
- True
- a slash /
- 2
- an opening tag
- The full moon
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids