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.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Litchi</li>
<li>Jamun</li>
<li>Orange</li>
</ol> -
2.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h3>I love mangoes.</h3>
<h4>Rain today</h4> - 3.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Language (c) Link (d) Line
-
4.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> (a) A tiger asleep (b) A red kite (c) tiger.jpg (d) width - 5.True or false: <title> goes in the head. (a) False (b) True
- 6.Which of these is true of a web browser? (a) sends pages over the net (b) shows pages from the web (c) hosts websites online (d) answers page requests
-
7.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Mango</li>
<li>Jamun</li>
</ul> -
8.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>Hello, world!</p>
<h2>Fun facts</h2> - 9.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
- 10.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h1> or <h5>? (a) <h1> (b) <h2> (c) <h5> (d) <h3>
-
11.🔗 Which words do you click on?
<a href="maths.html">Contact us</a> (a) maths.html (b) Visit the site (c) href (d) Contact us -
12.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="200"> (a) The full moon (b) bus.jpg (c) moon.png (d) fort.jpg - 13.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) alt (d) src
- 14.True or false: in <img>, src describes the picture. (a) True (b) False
-
15.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="300"> (a) width (b) moon.png (c) Our school bus (d) The full moon - 16.Which of these is an empty tag? (a) <title> (b) <li> (c) <p> (d) <hr>
-
17.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Our school trip</p>
<p>My pets</p>
<!-- <p>Cricket is fun.</p> --> - 18.📄 Can HTML on its own make tables? (a) No (b) Yes
-
19.🔗 Where does this link open?
<a href="contact.html">About us</a> (a) in the same tab (b) in a new tab -
20.🔍 Which line is missing its closing tag?
line 1: <h3>Hello, world!
line 2: <i>The red kite</i>
line 3: <strong>Good morning!</strong> (a) line 3 (b) line 1 (c) line 2 -
21.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Roses are red<br>Rivers flow<br>Birds sing<br>Sky is blue</p> - 22.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 1 (d) 3
-
23.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) An old fort (b) bus.jpg (c) width (d) Our school bus - 24.📝 What does <hr> draw? (a) a picture (b) a table (c) a line across the page (d) a link
-
25.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>The red kite</p>
<p>Cricket is fun.</p>
<p>My pets</p>
<p>My best friend</p> -
26.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>Our school trip</p>
<p>My pets</p>
<h2>Good morning!</h2>
<p>Good morning!</p> -
27.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h3>My pets</h3>
<h2>Our school trip</h2>
<h4>Fun facts</h4>
<h2>The red kite</h2> -
28.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Guava</li>
<li>Papaya</li>
<li>Jamun</li>
</ol> -
29.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>Hello, world!</p> -->
<p>Our school trip</p> - 30.📝 What do we need to write HTML? (a) a printer (b) a paintbrush (c) a microphone (d) a plain text editor
-
31.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>I love mangoes.</p>
<!-- <p>My best friend</p> --> (a) My best friend (b) Our school trip (c) I love mangoes. - 32.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the body (d) the title
- 33.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h1> or <h6>? (a) <h4> (b) <h1> (c) <h6> (d) <h2>
- 34.🔍 Which is the odd one out? (a) answers page requests (b) sends pages over the net (c) turns HTML into a page (d) stores a website’s files
-
35.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p> (a) Fun facts (b) Cricket is fun. (c) The red kite - 36.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
-
37.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Papaya</li>
<li>Orange</li>
<li>Grapes</li>
</ul> - 38.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 39.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to load it faster (d) to describe the image
- 40.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) width (c) alt (d) height
Answer key
- 2
- 3
- Language
- A tiger asleep
- True
- shows pages from the web
- 3
- 2
- href
- <h1>
- Contact us
- moon.png
- alt
- False
- The full moon
- <hr>
- 2
- Yes
- in the same tab
- line 1
- 5
- 1
- Our school bus
- a line across the page
- 4
- 4
- 5
- 2
- 2
- a plain text editor
- My best friend
- the body
- <h6>
- turns HTML into a page
- Fun facts
- <h6>
- 4
- an opening tag
- to describe the image
- width
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids