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.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
- 2.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <h2/> (c) <\h2> (d) <h2>
-
3.🖼️ 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) width (c) kite.png (d) A red kite -
4.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) map.png (b) kite.png (c) tiger.jpg (d) A tiger asleep -
5.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing<br>Rivers flow<br>Sky is blue</p> - 6.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
-
7.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="150"> (a) A red kite (b) Map of India (c) width (d) kite.png -
8.🔗 Where does this link open?
<a href="games.html">Art corner</a> (a) in the same tab (b) in a new tab -
9.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p> - 10.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to leave notes (d) to show pictures
-
11.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>My pets</p> -->
<p>Rain today</p> (a) Rain today (b) My pets (c) My best friend -
12.🔍 One closing tag is missing. Which one?
<h3>My best friend</h3>
<h2>Hello, world!
<i>Cricket is fun.</i> (a) </h3> (b) </small> (c) </h2> (d) </i> -
13.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Guava</li>
<li>Banana</li>
</ol> (a) bullets (b) numbers - 14.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) </body> (c) <!DOCTYPE html> (d) <html>
- 15.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) < (d) {
- 16.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h5> or <h1>? (a) <h3> (b) <h1> (c) <h5> (d) <h4>
- 17.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
-
18.🔍 One closing tag is missing. Which one?
<h3>Rain today</h3>
<u>I love mangoes.</u>
<strong>Our school trip (a) </strong> (b) </h3> (c) </small> (d) </u> -
19.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Mango</li>
<li>Jamun</li>
</ol> (a) bullets (b) numbers -
20.📋 What number does the browser show next to “Jamun”?
<ol start="4">
<li>Grapes</li>
<li>Mango</li>
<li>Orange</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Banana</li>
</ol> - 21.Which of these is an opening tag? (a) </li> (b) <b> (c) </p> (d) </h1>
- 22.🌐 Which one is where we type code? (a) a web browser (b) a code editor (c) a web server
- 23.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h6>? (a) <h1> (b) <h5> (c) <h4> (d) <h6>
- 24.📄 Can HTML on its own pick a random number? (a) Yes (b) No
-
25.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p> (a) I love mangoes. (b) My best friend (c) Cricket is fun. (d) Good morning! -
26.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Orange</li>
</ul> -
27.🔗 Which address opens when you click this link?
<a href="https://example.com">About us</a> (a) https://example.com (b) About us (c) maths.html (d) art.html -
28.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h4>Rain today</h4>
<h4>Cricket is fun.</h4> - 29.💬 How does an HTML comment start? (a) // (b) /* (c) # (d) <!--
- 30.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
- 31.Which of these is true of a code editor? (a) answers page requests (b) shows pages from the web (c) hosts websites online (d) saves our .html files
- 32.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h3>? (a) <h1> (b) <h3> (c) <h4> (d) <h5>
- 33.🔍 Which is the odd one out? (a) hosts websites online (b) shows line numbers (c) saves our .html files (d) is where we type code
- 34.True or false: <ol> is one item of a list. (a) True (b) False
- 35.🔍 Which is the odd one out? (a) answers page requests (b) hosts websites online (c) turns HTML into a page (d) sends pages over the net
-
36.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h3>Fun facts</h3>
<p>Rain today</p> -
37.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>My best friend</p>
<!-- <p>Good morning!</p> --> (a) Fun facts (b) My best friend (c) Good morning! - 38.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as one space (d) as a new line
- 39.True or false: a web server shows pages from the web. (a) False (b) True
- 40.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to load it faster (d) to make it bigger
Answer key
- No
- </h2>
- A red kite
- tiger.jpg
- 4
- <ol>
- A red kite
- in the same tab
- 2
- to leave notes
- My pets
- </h2>
- numbers
- <!DOCTYPE html>
- <
- <h1>
- a web server
- </strong>
- numbers
- 7
- <b>
- a code editor
- <h6>
- No
- I love mangoes.
- 2
- https://example.com
- 3
- <!--
- <!DOCTYPE html>
- saves our .html files
- <h5>
- hosts websites online
- False
- turns HTML into a page
- 2
- Good morning!
- as one space
- False
- to describe the image
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids