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.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine</p> - 2.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
3.🔗 Which address opens when you click this link?
<a href="news.html">Take the quiz</a> (a) games.html (b) quiz.html (c) Take the quiz (d) news.html - 4.Which of these is an opening tag? (a) </body> (b) </b> (c) </p> (d) <b>
- 5.True or false: HTML on its own can add up two numbers. (a) True (b) False
- 6.True or false: HTML on its own cannot run a game loop. (a) True (b) False
-
7.🔗 Where does this link open?
<a href="contact.html">Take the quiz</a> (a) in a new tab (b) in the same tab - 8.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <p> (d) <img>
-
9.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="350"> -
10.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Jamun</li>
</ol> (a) bullets (b) numbers - 11.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 12.True or false: <meta> has a closing tag. (a) False (b) True
- 13.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <img> (d) <a>
-
14.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Cricket is fun.</p>
<p>Fun facts</p>
<p>Rain today</p>
<p>Cricket is fun.</p>
<h2>My best friend</h2> - 15.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) element (d) editor
-
16.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="350"> (a) An old fort (b) A tiger asleep (c) width (d) fort.jpg -
17.🔗 Which address opens when you click this link?
<a href="about.html">Contact us</a> (a) https://example.com (b) Contact us (c) about.html (d) contact.html -
18.🔍 One closing tag is missing. Which one?
<small>Fun facts
<h2>Good morning!</h2>
<i>Rain today</i> (a) </i> (b) </small> (c) </b> (d) </h2> - 19.True or false: in <img>, src shows if the image fails. (a) False (b) True
-
20.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> --> (a) Hello, world! (b) The red kite (c) Cricket is fun. - 21.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <table> (c) <style> (d) <meta charset="utf-8">
-
22.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Our school trip</p> -->
<p>Fun facts</p>
<!-- <p>Good morning!</p> -->
<!-- <p>The red kite</p> --> -
23.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="50"> - 24.True or false: <br> has a closing tag. (a) True (b) False
-
25.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Orange</li>
<li>Litchi</li>
<li>Guava</li>
</ol> - 26.True or false: <b> has a closing tag. (a) True (b) False
- 27.True or false: a web server hosts websites online. (a) False (b) True
-
28.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="350"> (a) Map of India (b) map.png (c) width (d) Birthday cake - 29.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h5>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
-
30.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> --> (a) I love mangoes. (b) Our school trip (c) The red kite -
31.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p>
<p>Fun facts</p>
<p>My best friend</p> - 32.📝 What does <hr> draw? (a) a table (b) a picture (c) a line across the page (d) a link
- 33.True or false: HTML on its own can make links to pages. (a) True (b) False
- 34.True or false: a web server shows line numbers. (a) True (b) False
- 35.Which of these goes in the head? (a) <ul> (b) <img> (c) <h1> (d) <meta charset="utf-8">
- 36.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 37.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
-
38.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Fun facts</p>
<h2>Good morning!</h2> - 39.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
- 40.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h3> or <h4>? (a) <h4> (b) <h6> (c) <h2> (d) <h3>
Answer key
- 2
- a closing tag
- news.html
- <b>
- False
- True
- in the same tab
- <img>
- 350
- numbers
- a closing tag
- False
- <a>
- 5
- element
- An old fort
- about.html
- </small>
- False
- Cricket is fun.
- <table>
- 2
- 50
- False
- 2
- True
- True
- Map of India
- <h1>
- Our school trip
- 3
- a line across the page
- True
- False
- <meta charset="utf-8">
- has a closing tag
- <!DOCTYPE html>
- 2
- <ol>
- <h2>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids