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.🔗 Where does this link open?
<a href="news.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab -
2.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="300"> - 3.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 4.📄 Can HTML on its own make links to pages? (a) No (b) Yes
- 5.Which of these has a closing tag? (a) <input> (b) <h1> (c) <hr> (d) <br>
- 6.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) address (d) element
- 7.💬 Does the browser show comments on the page? (a) No (b) Yes
- 8.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 9.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h2> or <h5>? (a) <h6> (b) <h5> (c) <h4> (d) <h2>
- 10.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 11.🔢 In a basic web page file, which comes LAST? (a) </html> (b) </body> (c) <html> (d) </head>
- 12.Which of these is an opening tag? (a) </title> (b) <title> (c) </h1> (d) </p>
-
13.🔍 One closing tag is missing. Which one?
<u>My pets</u>
<i>Our school trip
<h3>I love mangoes.</h3> (a) </u> (b) </h3> (c) </h1> (d) </i> -
14.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Good morning!</p> -->
<p>Rain today</p> (a) Rain today (b) Good morning! (c) Hello, world! - 15.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Machine (d) Mouse
- 16.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h1> (d) <h6>
-
17.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="200"> (a) cake.jpg (b) map.png (c) Map of India (d) dog.jpg -
18.🔍 One closing tag is missing. Which one?
<h1>Good morning!</h1>
<small>My pets
<p>Hello, world!</p> (a) </p> (b) </b> (c) </h1> (d) </small> - 19.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <title> (d) <ul>
- 20.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
-
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="250"> (a) width (b) map.png (c) Map of India (d) Birthday cake - 22.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <\h2> (c) <h2> (d) <h2/>
- 23.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h6>? (a) <h6> (b) <h5> (c) <h3> (d) <h1>
- 24.📋 Which list tag is an ordered list? (a) <ol> (b) <ul> (c) <li>
-
25.🔗 Which words do you click on?
<a href="about.html">School news</a> (a) School news (b) Take the quiz (c) href (d) about.html - 26.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <!DOCTYPE html> (b) <html>
- 27.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 28.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h2>? (a) <h1> (b) <h3> (c) <h2> (d) <h6>
-
29.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="150"> - 30.Which of these goes in the body? (a) <img> (b) <style> (c) <link rel="stylesheet"> (d) <title>
-
31.🔍 One closing tag is missing. Which one?
<strong>I love mangoes.
<h1>Hello, world!</h1>
<i>Rain today</i> (a) </p> (b) </h1> (c) </strong> (d) </i> - 32.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
-
33.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) About us (b) https://example.com (c) Contact us (d) href - 34.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
35.🔗 Which words do you click on?
<a href="https://example.com">Visit the site</a> (a) Maths fun (b) https://example.com (c) href (d) Visit the site - 36.🏷️ Which is the closing tag for <i>? (a) <\i> (b) </i> (c) <i/> (d) <i>
-
37.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Orange</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Papaya</li>
<li>Grapes</li>
</ol> - 38.📋 Which list suits a shopping list in any order? (a) <br> (b) <ul> (c) <ol> (d) <hr>
-
39.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Rain today</p>
<p>Good morning!</p>
<h3>Rain today</h3> - 40.Which of these is true of a web server? (a) turns HTML into a page (b) opens web pages for us (c) shows pages from the web (d) hosts websites online
Answer key
- in a new tab
- 300
- Yes
- Yes
- <h1>
- element
- No
- an empty tag
- <h2>
- has a closing tag
- </html>
- <title>
- </i>
- Good morning!
- Markup
- <h1>
- map.png
- </small>
- <ul>
- <ol>
- Map of India
- </h2>
- <h1>
- <ol>
- School news
- <!DOCTYPE html>
- a closing tag
- <h6>
- 150
- <img>
- </strong>
- True
- About us
- has a closing tag
- Visit the site
- </i>
- 3
- <ul>
- 2
- hosts websites online
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids