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 many headings are in this code?
<h1>Our school trip</h1>
<h3>My pets</h3>
<p>Rain today</p> - 2.💬 Does the browser show comments on the page? (a) Yes (b) No
- 3.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
- 4.True or false: in <img>, height is read by screen readers. (a) False (b) True
- 5.💬 How does an HTML comment end? (a) // (b) >> (c) --> (d) */
-
6.🔗 Which address opens when you click this link?
<a href="news.html">Maths fun</a> (a) quiz.html (b) news.html (c) Maths fun (d) games.html -
7.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>My pets</h2>
<h2>I love mangoes.</h2> - 8.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
9.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="50"> (a) dog.jpg (b) cake.jpg (c) map.png (d) Map of India - 10.True or false: in <img>, alt tells which image to load. (a) True (b) False
-
11.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="200"> - 12.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
-
13.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Stars shine<br>Roses are red<br>Rivers flow</p> - 14.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
-
15.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) moon.png (b) bus.jpg (c) A happy dog (d) dog.jpg - 16.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) src (d) alt
- 17.Which of these is an empty tag? (a) <b> (b) <ul> (c) <li> (d) <hr>
- 18.Which of these is a closing tag? (a) <title> (b) <b> (c) </li> (d) <p>
- 19.True or false: <style> goes in the head. (a) True (b) False
- 20.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
21.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h4>Our school trip</h4>
<p>Rain today</p>
<p>Our school trip</p> -
22.🔍 One closing tag is missing. Which one?
<u>My best friend
<small>Good morning!</small>
<h1>My pets</h1> (a) </h1> (b) </small> (c) </u> (d) </strong> -
23.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> --> - 24.Which of these goes in the head? (a) <ul> (b) <table> (c) <a> (d) <title>
-
25.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="50"> (a) cake.jpg (b) A red kite (c) map.png (d) kite.png - 26.📝 What do we need to write HTML? (a) a microphone (b) a paintbrush (c) a plain text editor (d) a printer
-
27.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Our school trip</p>
<p>Hello, world!</p>
<h2>Cricket is fun.</h2>
<h2>Cricket is fun.</h2> - 28.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) editor (d) attribute
- 29.Which of these is an opening tag? (a) </p> (b) </body> (c) <li> (d) </h1>
- 30.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dollar $ (d) a dot .
- 31.🔢 In a basic web page file, which comes LAST? (a) </head> (b) <html> (c) <!DOCTYPE html> (d) </html>
- 32.True or false: <li> is an unordered list. (a) True (b) False
-
33.📋 What number does the browser show next to “Mango”?
<ol>
<li>Papaya</li>
<li>Mango</li>
<li>Guava</li>
<li>Banana</li>
<li>Orange</li>
</ol> - 34.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h4>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
-
35.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Our school trip</p>
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p> (a) Fun facts (b) The red kite (c) Our school trip (d) Cricket is fun. -
36.🔍 Which line is missing its closing tag?
line 1: <u>I love mangoes.</u>
line 2: <em>Fun facts</em>
line 3: <h3>Hello, world! (a) line 2 (b) line 3 (c) line 1 -
37.🔗 Which words do you click on?
<a href="games.html">Take the quiz</a> (a) Play games (b) games.html (c) href (d) Take the quiz -
38.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) A tiger asleep (b) kite.png (c) map.png (d) tiger.jpg - 39.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the body (d) the doctype
-
40.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>Fun facts</p> -->
<!-- <p>Cricket is fun.</p> -->
<!-- <p>The red kite</p> -->
<p>Our school trip</p>
Answer key
- 2
- No
- a web browser
- False
- -->
- news.html
- 3
- has a closing tag
- map.png
- False
- 200
- Yes
- 4
- <!DOCTYPE html>
- dog.jpg
- src
- <hr>
- </li>
- True
- Yes
- 2
- </u>
- 1
- <title>
- kite.png
- a plain text editor
- 3
- element
- <li>
- a slash /
- </html>
- False
- 2
- <h5>
- Cricket is fun.
- line 3
- Take the quiz
- tiger.jpg
- the body
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids