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.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
- 2.True or false: HTML on its own can add pictures to a page. (a) True (b) False
- 3.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h3> or <h4>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
-
4.🔍 One closing tag is missing. Which one?
<em>I love mangoes.</em>
<h1>Fun facts</h1>
<p>Good morning! (a) </i> (b) </h1> (c) </em> (d) </p> - 5.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) opens it in a new tab (d) hides the link
- 6.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 7.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 8.True or false: in <img>, height is read by screen readers. (a) True (b) False
- 9.True or false: a code editor stores a website’s files. (a) True (b) False
- 10.🏷️ Which is the closing tag for <i>? (a) <i> (b) <\i> (c) <i/> (d) </i>
-
11.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="300"> (a) kite.png (b) Map of India (c) A red kite (d) width - 12.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
- 13.True or false: <ul> is an unordered list. (a) False (b) True
- 14.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
-
15.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Good morning!</p>
<h2>Hello, world!</h2>
<p>Hello, world!</p>
<h2>Cricket is fun.</h2>
<p>Hello, world!</p> -
16.🔍 One closing tag is missing. Which one?
<u>My pets</u>
<em>Fun facts</em>
<strong>Cricket is fun. (a) </em> (b) </strong> (c) </u> (d) </h1> -
17.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine</p> -
18.🔗 Which words do you click on?
<a href="games.html">Art corner</a> (a) games.html (b) Art corner (c) School news (d) href -
19.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Papaya</li>
<li>Mango</li>
</ul> (a) bullets (b) numbers - 20.💬 Does the browser show comments on the page? (a) Yes (b) No
-
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="300"> (a) A happy dog (b) cake.jpg (c) Birthday cake (d) width - 22.🔢 In a basic web page file, which comes first: “<head>” or “<!DOCTYPE html>”? (a) <head> (b) <!DOCTYPE html>
-
23.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Birds sing<br>Stars shine<br>Kites fly high</p> - 24.True or false: <img> has a closing tag. (a) False (b) True
- 25.Which of these is an empty tag? (a) <br> (b) <ul> (c) <title> (d) <h1>
- 26.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) </head>
- 27.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 28.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h1> or <h6>? (a) <h5> (b) <h2> (c) <h1> (d) <h6>
- 29.True or false: in <img>, width describes the picture. (a) True (b) False
- 30.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <ol> (c) <li>
-
31.🔗 Which address opens when you click this link?
<a href="contact.html">About us</a> (a) contact.html (b) About us (c) https://example.com (d) maths.html - 32.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a hash # (d) a dot .
-
33.🔗 Which address opens when you click this link?
<a href="https://example.com">Contact us</a> (a) Contact us (b) maths.html (c) art.html (d) https://example.com - 34.Which of these is true of a code editor? (a) hosts websites online (b) turns HTML into a page (c) saves our .html files (d) sends pages over the net
- 35.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
- 36.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 37.Which of these is a closing tag? (a) <p> (b) </body> (c) <b> (d) <h1>
- 38.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) </h1> (c) <h1/> (d) <\h1>
- 39.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
-
40.🔗 Which address opens when you click this link?
<a href="about.html">Play games</a> (a) Play games (b) contact.html (c) about.html (d) https://example.com
Answer key
- to describe the image
- True
- <h5>
- </p>
- opens it in a new tab
- Yes
- an opening tag
- False
- False
- </i>
- A red kite
- <ul>
- True
- <h1>
- 4
- </strong>
- 2
- Art corner
- bullets
- No
- Birthday cake
- <!DOCTYPE html>
- 4
- False
- <br>
- <!DOCTYPE html>
- an empty tag
- <h6>
- False
- <li>
- contact.html
- a slash /
- https://example.com
- saves our .html files
- <a>
- a closing tag
- </body>
- </h1>
- href
- about.html
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids