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 tag goes around each item of a list? (a) <li> (b) <p> (c) <ul> (d) <ol>
- 2.📄 Can HTML on its own make links to pages? (a) Yes (b) No
- 3.True or false: a web server answers page requests. (a) True (b) False
-
4.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>My best friend</p> -->
<p>My pets</p> -
5.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>The red kite</h2>
<h2>Fun facts</h2> - 6.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <body> (b) <!DOCTYPE html>
- 7.True or false: in <img>, width tells which image to load. (a) False (b) True
-
8.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Orange</li>
</ol> (a) bullets (b) numbers - 9.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 6 (d) 3
- 10.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dollar $ (c) a hash # (d) a dot .
-
11.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Rain today</p>
<h2>My pets</h2> - 12.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
13.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="350"> (a) cake.jpg (b) dog.jpg (c) map.png (d) Map of India - 14.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) at the bottom (d) on the browser tab
- 15.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) src (d) width
-
16.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Cricket is fun.</p>
<!-- <p>Good morning!</p> --> - 17.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
-
18.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="100"> (a) kite.png (b) tiger.jpg (c) An old fort (d) fort.jpg - 19.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) <body> (c) </html> (d) </head>
- 20.Which of these has a closing tag? (a) <meta> (b) <br> (c) <img> (d) <h1>
- 21.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <a> (d) <pic>
-
22.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>My best friend</p>
<!-- <p>Good morning!</p> -->
<p>Rain today</p> - 23.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <h3> (d) <p>
- 24.Which of these is an opening tag? (a) </body> (b) </p> (c) </b> (d) <li>
- 25.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
- 26.💬 How does an HTML comment end? (a) --> (b) // (c) >> (d) */
- 27.🏷️ Which is the closing tag for <b>? (a) <\b> (b) <b> (c) </b> (d) <b/>
- 28.Which of these is a closing tag? (a) <title> (b) <h1> (c) <body> (d) </p>
- 29.Which of these has a closing tag? (a) <input> (b) <br> (c) <b> (d) <img>
-
30.🔍 One closing tag is missing. Which one?
<i>I love mangoes.</i>
<small>Hello, world!
<h1>Good morning!</h1> (a) </h1> (b) </b> (c) </i> (d) </small> -
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="100"> (a) Birthday cake (b) width (c) Map of India (d) map.png -
32.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Hello, world!</p>
<p>Good morning!</p>
<!-- <p>My pets</p> --> (a) My pets (b) Fun facts (c) Hello, world! (d) Good morning! - 33.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
- 34.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <table> (c) <meta charset="utf-8"> (d) <title>
-
35.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>My best friend</p>
<p>Our school trip</p>
<p>Our school trip</p>
<p>The red kite</p> - 36.🏷️ Every HTML tag starts with which sign? (a) { (b) < (c) ( (d) [
- 37.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
38.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="50"> (a) map.png (b) A red kite (c) kite.png (d) cake.jpg - 39.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
- 40.Which of these is a closing tag? (a) <p> (b) <b> (c) </li> (d) <h1>
Answer key
- <li>
- Yes
- True
- 2
- 1
- <!DOCTYPE html>
- False
- numbers
- 6
- a slash /
- 2
- has a closing tag
- map.png
- on the browser tab
- alt
- 2
- opens it in a new tab
- fort.jpg
- </html>
- <h1>
- <img>
- 3
- <h6>
- <li>
- <a href="about.html">
- -->
- </b>
- </p>
- <b>
- </small>
- Map of India
- My pets
- <!--
- <table>
- 1
- <
- an opening tag
- kite.png
- <h1>
- </li>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids