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 <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
-
2.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Mango</li>
<li>Jamun</li>
</ol> (a) bullets (b) numbers - 3.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <link rel="stylesheet"> (d) <p>
-
4.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) dog.jpg (b) width (c) The full moon (d) A happy dog - 5.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
-
6.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) contact.html (b) href (c) Play games (d) About us - 7.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h4> or <h5>? (a) <h4> (b) <h3> (c) <h2> (d) <h5>
- 8.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
-
9.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="350"> - 10.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h2>? (a) <h4> (b) <h5> (c) <h6> (d) <h2>
- 11.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to describe the image (d) to load it faster
-
12.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Papaya</li>
<li>Banana</li>
</ol> (a) numbers (b) bullets - 13.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h4>? (a) <h4> (b) <h2> (c) <h1> (d) <h5>
- 14.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 15.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h3>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
- 16.📄 Can HTML on its own make a form? (a) Yes (b) No
- 17.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h6> or <h1>? (a) <h5> (b) <h6> (c) <h2> (d) <h1>
- 18.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h1>? (a) <h3> (b) <h2> (c) <h6> (d) <h1>
- 19.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h4>? (a) <h4> (b) <h6> (c) <h3> (d) <h1>
-
20.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>My best friend</p>
<h4>Hello, world!</h4>
<p>The red kite</p>
<p>Fun facts</p> - 21.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
- 22.📋 Which list tag is an unordered list? (a) <ul> (b) <ol> (c) <li>
- 23.📄 Can HTML on its own make headings? (a) Yes (b) No
- 24.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a hash # (d) a dollar $
-
25.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Fun facts</p>
<p>Good morning!</p> (a) Rain today (b) Fun facts (c) Good morning! - 26.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
-
27.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="150"> (a) Map of India (b) Birthday cake (c) width (d) map.png - 28.Which of these is true of a code editor? (a) turns HTML into a page (b) is where we type code (c) sends pages over the net (d) answers page requests
- 29.True or false: <input> is an empty tag. (a) False (b) True
-
30.🔗 Which address opens when you click this link?
<a href="maths.html">Play games</a> (a) art.html (b) Play games (c) news.html (d) maths.html -
31.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>My best friend</p>
<p>I love mangoes.</p>
<h3>Rain today</h3> -
32.🔍 One closing tag is missing. Which one?
<h3>Fun facts
<h2>Cricket is fun.</h2>
<em>I love mangoes.</em> (a) </em> (b) </h1> (c) </h3> (d) </h2> - 33.True or false: HTML on its own cannot run a game loop. (a) True (b) False
- 34.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
- 35.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <meta charset="utf-8"> (d) <ul>
- 36.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) HyperText (c) Home Text (d) High Tech
-
37.🔗 Which words do you click on?
<a href="about.html">Take the quiz</a> (a) Play games (b) about.html (c) href (d) Take the quiz - 38.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h1> or <h4>? (a) <h1> (b) <h5> (c) <h4> (d) <h6>
- 39.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h1> (d) <h3>
- 40.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) sends pages over the net (d) shows pages from the web
Answer key
- in the head
- numbers
- <p>
- A happy dog
- src
- Play games
- <h5>
- <h1>
- 350
- <h2>
- to describe the image
- numbers
- <h1>
- a closing tag
- <h1>
- Yes
- <h1>
- <h6>
- <h6>
- 2
- to leave notes
- <ul>
- Yes
- a slash /
- Rain today
- <a>
- Map of India
- is where we type code
- True
- maths.html
- 2
- </h3>
- True
- <ol>
- <ul>
- HyperText
- Take the quiz
- <h6>
- <h6>
- sends pages over the net
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids