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.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Orange</li>
</ul> - 2.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <p> (d) <pic>
-
3.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Jamun</li>
<li>Banana</li>
<li>Grapes</li>
</ul> -
4.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>My best friend</p> -->
<p>Rain today</p> (a) Our school trip (b) My best friend (c) Rain today - 5.True or false: <h1> goes in the head. (a) False (b) True
- 6.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h2>? (a) <h3> (b) <h6> (c) <h2> (d) <h1>
- 7.True or false: a web browser is where we type code. (a) True (b) False
- 8.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 9.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) opens it in a new tab (d) makes it bold
-
10.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>My best friend</p> -->
<p>The red kite</p>
<p>Good morning!</p> - 11.Which of these is an opening tag? (a) </body> (b) </b> (c) <b> (d) </p>
- 12.📄 Can HTML on its own make headings? (a) No (b) Yes
-
13.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="150"> - 14.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
- 15.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 16.📄 Can HTML on its own run a game loop? (a) Yes (b) No
- 17.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an attribute (d) an element name
-
18.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>My best friend</p>
<h4>Cricket is fun.</h4>
<h4>The red kite</h4>
<h3>Cricket is fun.</h3> - 19.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <h3> (c) <\h3> (d) </h3>
- 20.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
21.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Banana</li>
<li>Papaya</li>
<li>Guava</li>
</ol> - 22.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a dollar $ (d) a hash #
- 23.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
- 24.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h3> or <h1>? (a) <h3> (b) <h6> (c) <h5> (d) <h1>
- 25.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <hr> (d) <ul>
-
26.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="50"> (a) Map of India (b) width (c) kite.png (d) A red kite - 27.Which of these has a closing tag? (a) <meta> (b) <ul> (c) <hr> (d) <img>
- 28.True or false: a web browser opens web pages for us. (a) False (b) True
-
29.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="50"> -
30.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>My best friend</h2>
<p>Rain today</p>
<p>I love mangoes.</p> - 31.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) src (d) id
- 32.📄 Can HTML on its own count button clicks? (a) Yes (b) No
- 33.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h3> or <h4>? (a) <h1> (b) <h3> (c) <h4> (d) <h5>
- 34.Which of these is true of a web browser? (a) colours code to help us (b) shows line numbers (c) stores a website’s files (d) turns HTML into a page
- 35.True or false: <ul> lists things in any order. (a) False (b) True
-
36.🔗 Which words do you click on?
<a href="contact.html">Contact us</a> (a) href (b) contact.html (c) Visit the site (d) Contact us -
37.🔗 Which words do you click on?
<a href="art.html">Visit the site</a> (a) href (b) Maths fun (c) art.html (d) Visit the site -
38.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) maths.html (b) https://example.com (c) Play games (d) contact.html -
39.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Rain today</p>
<p>My pets</p> (a) Rain today (b) My pets (c) Our school trip - 40.Which of these is a closing tag? (a) <b> (b) <p> (c) </b> (d) <title>
Answer key
- 2
- <img>
- 4
- My best friend
- False
- <h6>
- False
- an opening tag
- opens it in a new tab
- 2
- <b>
- Yes
- 150
- False
- a closing tag
- No
- an attribute
- 4
- </h3>
- Yes
- 6
- a slash /
- <ol>
- <h1>
- <ul>
- A red kite
- <ul>
- True
- 50
- 3
- href
- No
- <h1>
- turns HTML into a page
- True
- Contact us
- Visit the site
- contact.html
- Our school trip
- </b>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids