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 heading shows the BIGGEST text: <h5>, <h3>, <h1> or <h2>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
- 2.🔍 Which is the odd one out? (a) shows line numbers (b) is where we type code (c) stores a website’s files (d) colours code to help us
-
3.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Jamun</li>
<li>Guava</li>
<li>Litchi</li>
<li>Orange</li>
<li>Papaya</li>
</ol> -
4.🔗 Which address opens when you click this link?
<a href="art.html">Maths fun</a> (a) Maths fun (b) art.html (c) news.html (d) quiz.html - 5.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h6> (d) <h3>
- 6.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) </body> (c) </head> (d) <!DOCTYPE html>
- 7.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h1> (d) <h6>
- 8.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) height (c) width (d) alt
- 9.Which of these is a closing tag? (a) <li> (b) <title> (c) <body> (d) </h1>
- 10.True or false: <ul> goes inside ul or ol. (a) True (b) False
-
11.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) index.html (b) Cricket Club (c) We won by 5 runs. (d) All about me -
12.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>The red kite</p>
<p>The red kite</p> -
13.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="200"> (a) Our school bus (b) width (c) bus.jpg (d) An old fort - 14.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
-
15.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Stars shine</p> -
16.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Rain today</p> -->
<p>Hello, world!</p> - 17.🔍 Which is the odd one out? (a) opens web pages for us (b) shows line numbers (c) is where we type code (d) saves our .html files
- 18.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
-
19.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>The red kite</p>
<p>Our school trip</p>
<p>Hello, world!</p>
<p>Hello, world!</p>
<h2>Good morning!</h2> - 20.🔠 How many heading levels does HTML have? (a) 4 (b) 6 (c) 10 (d) 3
-
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="150"> (a) Our school bus (b) An old fort (c) width (d) bus.jpg - 22.Which of these is true of a web server? (a) opens web pages for us (b) has an address bar (c) saves our .html files (d) sends pages over the net
- 23.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a href="about.html"> (d) <a alt="about.html">
-
24.🔗 Which address opens when you click this link?
<a href="maths.html">Maths fun</a> (a) maths.html (b) Maths fun (c) art.html (d) news.html -
25.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="300"> -
26.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Mango</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Guava</li>
</ol> - 27.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
- 28.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) height (d) alt
-
29.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Grapes</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets -
30.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) kite.png (b) tiger.jpg (c) map.png (d) A tiger asleep - 31.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
-
32.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>Our school trip</p>
<h2>My best friend</h2> - 33.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
34.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>Good morning!</p>
<!-- <p>Rain today</p> -->
<p>Our school trip</p> - 35.Which of these is true of a web server? (a) saves our .html files (b) stores a website’s files (c) opens web pages for us (d) shows pages from the web
- 36.Which of these is an opening tag? (a) </b> (b) </li> (c) </p> (d) <h1>
- 37.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
-
38.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>Good morning!</p> -->
<p>Rain today</p> - 39.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <br> (d) <p>
- 40.Which of these goes in the body? (a) <style> (b) <title> (c) <link rel="stylesheet"> (d) <h1>
Answer key
- <h1>
- stores a website’s files
- 6
- art.html
- <h6>
- <!DOCTYPE html>
- <h6>
- alt
- </h1>
- False
- Cricket Club
- 3
- Our school bus
- <h1>
- 2
- 2
- opens web pages for us
- in the body
- 5
- 6
- Our school bus
- sends pages over the net
- <a href="about.html">
- maths.html
- 300
- 5
- on the browser tab
- alt
- bullets
- tiger.jpg
- <ol>
- 2
- has a closing tag
- 4
- stores a website’s files
- <h1>
- a web browser
- 1
- <p>
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids