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.Which of these is an empty tag? (a) <b> (b) <ul> (c) <title> (d) <meta>
- 2.True or false: <li> lists things in any order. (a) False (b) True
-
3.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="50"> - 4.📝 What does <hr> draw? (a) a line across the page (b) a table (c) a picture (d) a link
- 5.True or false: in <img>, height is read by screen readers. (a) False (b) True
- 6.📝 What do we need to write HTML? (a) a printer (b) a plain text editor (c) a microphone (d) a paintbrush
-
7.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="300"> (a) A red kite (b) Map of India (c) kite.png (d) width -
8.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p>
<p>Our school trip</p> (a) Hello, world! (b) Good morning! (c) Our school trip -
9.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> -->
<p>My pets</p> (a) Good morning! (b) Cricket is fun. (c) My pets -
10.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Guava</li>
<li>Grapes</li>
<li>Orange</li>
<li>Litchi</li>
<li>Banana</li>
</ol> - 11.🌍 Which program shows a web page to us? (a) a web browser (b) a calculator (c) a music player (d) a paint program
-
12.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Mango</li>
<li>Guava</li>
</ul> - 13.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 6 (d) 10
- 14.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) height (d) alt
-
15.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Rivers flow</p> - 16.True or false: <style> goes in the head. (a) True (b) False
-
17.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<!-- <p>Good morning!</p> -->
<p>Rain today</p> (a) Rain today (b) Good morning! (c) Fun facts - 18.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h1>? (a) <h5> (b) <h4> (c) <h1> (d) <h6>
- 19.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 20.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
- 21.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <link> (d) <img>
- 22.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <body> (c) <head> (d) <!DOCTYPE html>
- 23.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h3> (d) <h6>
- 24.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the body (d) the head
- 25.True or false: <li> is an empty tag. (a) False (b) True
- 26.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
27.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>I love mangoes.</h2>
<p>Hello, world!</p> -
28.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>My pets</p>
<p>Good morning!</p>
<p>Our school trip</p> - 29.🌐 Which one shows line numbers? (a) a web browser (b) a web server (c) a code editor
-
30.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="300"> - 31.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h4>? (a) <h1> (b) <h2> (c) <h3> (d) <h4>
-
32.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Litchi</li>
<li>Guava</li>
<li>Mango</li>
<li>Banana</li>
<li>Jamun</li>
</ul> - 33.True or false: <h1> goes in the head. (a) True (b) False
- 34.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) height (d) alt
-
35.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) dog.jpg (b) cake.jpg (c) Birthday cake (d) moon.png -
36.📋 What number does the browser show next to “Mango”?
<ol start="3">
<li>Jamun</li>
<li>Mango</li>
<li>Banana</li>
</ol> - 37.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h2>? (a) <h2> (b) <h1> (c) <h6> (d) <h5>
-
38.🔗 Which words do you click on?
<a href="maths.html">Take the quiz</a> (a) Take the quiz (b) Play games (c) maths.html (d) href - 39.💬 How does an HTML comment start? (a) /* (b) // (c) <!-- (d) #
-
40.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Good morning!</p> -->
<p>My pets</p>
Answer key
- <meta>
- False
- 50
- a line across the page
- False
- a plain text editor
- A red kite
- Hello, world!
- Cricket is fun.
- 2
- a web browser
- 5
- 1
- alt
- 2
- True
- Good morning!
- <h1>
- has a closing tag
- <ol>
- <a>
- <!DOCTYPE html>
- <h6>
- the body
- False
- an opening tag
- 2
- 4
- a code editor
- 300
- <h4>
- 6
- False
- width
- cake.jpg
- 4
- <h1>
- Take the quiz
- <!--
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids