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.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
- 2.📋 Which list tag is one item of a list? (a) <li> (b) <ul> (c) <ol>
- 3.True or false: in <img>, alt describes the picture. (a) True (b) False
-
4.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="200"> - 5.Which of these goes in the body? (a) <style> (b) <title> (c) <img> (d) <link rel="stylesheet">
- 6.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
7.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>Good morning!</p>
<!-- <p>I love mangoes.</p> --> -
8.🔗 Which words do you click on?
<a href="games.html">Art corner</a> (a) School news (b) href (c) Art corner (d) games.html -
9.🔗 Which address opens when you click this link?
<a href="contact.html">School news</a> (a) maths.html (b) https://example.com (c) School news (d) contact.html -
10.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Jamun</li>
<li>Guava</li>
<li>Banana</li>
<li>Grapes</li>
</ul> -
11.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="100"> (a) Map of India (b) map.png (c) cake.jpg (d) dog.jpg -
12.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<!-- <p>My pets</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> --> -
13.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>Our school trip</p> -->
<p>My best friend</p>
<p>The red kite</p>
<p>My pets</p> - 14.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to make it bigger (c) to colour it (d) to describe the image
- 15.True or false: HTML on its own can add up two numbers. (a) True (b) False
- 16.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
- 17.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
-
18.🔍 One closing tag is missing. Which one?
<em>Fun facts</em>
<i>The red kite</i>
<strong>My best friend (a) </i> (b) </strong> (c) </em> (d) </b> - 19.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
-
20.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h2>Fun facts</h2>
<p>My best friend</p> - 21.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
- 22.Which of these is true of a web browser? (a) colours code to help us (b) answers page requests (c) hosts websites online (d) opens web pages for us
- 23.Which of these is true of a web browser? (a) turns HTML into a page (b) saves our .html files (c) sends pages over the net (d) hosts websites online
-
24.🔍 One closing tag is missing. Which one?
<small>The red kite</small>
<strong>My best friend</strong>
<h2>Cricket is fun. (a) </strong> (b) </h2> (c) </small> (d) </p> - 25.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
26.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Papaya</li>
<li>Grapes</li>
</ul> - 27.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) height (d) width
- 28.True or false: <img> has a closing tag. (a) True (b) False
-
29.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>The red kite</p>
<h2>Our school trip</h2>
<p>Cricket is fun.</p> -
30.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Banana</li>
</ul> (a) bullets (b) numbers -
31.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>My pets</p> -->
<p>Our school trip</p> - 32.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a closing tag (d) a comment
-
33.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="50"> -
34.🔍 One closing tag is missing. Which one?
<h2>Good morning!</h2>
<h1>Our school trip
<em>Fun facts</em> (a) </h1> (b) </i> (c) </em> (d) </h2> - 35.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h4> or <h1>? (a) <h1> (b) <h4> (c) <h3> (d) <h2>
- 36.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
- 37.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
- 38.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
39.🔗 Which words do you click on?
<a href="games.html">Visit the site</a> (a) games.html (b) Visit the site (c) href (d) Maths fun -
40.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) The full moon (b) A happy dog (c) dog.jpg (d) width
Answer key
- opens it in a new tab
- <li>
- True
- 200
- <img>
- an empty tag
- 2
- Art corner
- contact.html
- 5
- map.png
- 1
- 4
- to describe the image
- False
- in the body
- <a>
- </strong>
- <ul>
- 2
- <ol>
- opens web pages for us
- turns HTML into a page
- </h2>
- a closing tag
- 3
- alt
- False
- 2
- bullets
- 2
- an attribute
- 50
- </h1>
- <h4>
- Yes
- <ol>
- Yes
- Visit the site
- A happy dog
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids