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 address opens when you click this link?
<a href="quiz.html">Take the quiz</a> (a) quiz.html (b) games.html (c) Take the quiz (d) about.html - 2.📄 Can HTML on its own make links to pages? (a) No (b) Yes
- 3.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) src (d) width
-
4.🔗 Where does this link open?
<a href="contact.html">Take the quiz</a> (a) in the same tab (b) in a new tab - 5.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 6.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) <h2/> (d) </h2>
- 7.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 8.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i> (c) <i/> (d) </i>
-
9.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="250"> (a) The full moon (b) width (c) Our school bus (d) moon.png - 10.True or false: in <img>, height sets how tall it is. (a) True (b) False
-
11.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Grapes</li>
<li>Mango</li>
</ul> (a) numbers (b) bullets - 12.True or false: <li> has a closing tag. (a) False (b) True
- 13.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h5> or <h3>? (a) <h2> (b) <h5> (c) <h1> (d) <h3>
- 14.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 15.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a slash / (d) a dollar $
-
16.🔗 Which words do you click on?
<a href="games.html">Art corner</a> (a) href (b) games.html (c) School news (d) Art corner -
17.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Birds sing<br>Stars shine</p> -
18.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Our school trip</p>
<!-- <p>My pets</p> -->
<p>Good morning!</p>
<p>Hello, world!</p> -
19.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p>
<p>Rain today</p> (a) I love mangoes. (b) Our school trip (c) Cricket is fun. (d) Rain today - 20.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <pic> (d) <img>
- 21.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) < (d) (
-
22.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Play games</a> (a) in the same tab (b) in a new tab -
23.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>My pets</p>
<h2>Good morning!</h2>
<h2>Cricket is fun.</h2>
<h2>Good morning!</h2>
<p>Hello, world!</p> -
24.🔍 Which line is missing its closing tag?
line 1: <h3>Good morning!
line 2: <em>Fun facts</em>
line 3: <h2>Cricket is fun.</h2> (a) line 1 (b) line 3 (c) line 2 - 25.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <\h3> (c) </h3> (d) <h3>
- 26.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h1>? (a) <h3> (b) <h6> (c) <h1> (d) <h2>
-
27.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Stars shine<br>Rivers flow<br>Sky is blue</p> - 28.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
-
29.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) https://example.com (b) Contact us (c) About us (d) href -
30.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h2>Good morning!</h2>
<h3>Cricket is fun.</h3> - 31.True or false: <ul> shows 1, 2, 3 numbers. (a) False (b) True
- 32.Which of these is an opening tag? (a) </p> (b) </li> (c) <p> (d) </body>
-
33.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Guava</li>
<li>Litchi</li>
</ul> - 34.Which of these has a closing tag? (a) <img> (b) <br> (c) <hr> (d) <p>
- 35.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h6> or <h3>? (a) <h5> (b) <h6> (c) <h1> (d) <h3>
- 36.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to load it faster (d) to colour it
- 37.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 38.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
- 39.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
- 40.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
Answer key
- quiz.html
- Yes
- src
- in the same tab
- Yes
- </h2>
- a closing tag
- </i>
- The full moon
- True
- bullets
- True
- <h1>
- a closing tag
- a slash /
- Art corner
- 3
- 3
- Our school trip
- <img>
- <
- in a new tab
- 3
- line 1
- </h3>
- <h1>
- 4
- <ul>
- About us
- 3
- False
- <p>
- 3
- <p>
- <h6>
- to describe the image
- an opening tag
- <a href="about.html">
- <h1>
- has a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids