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 body (b) in the head
- 2.💬 Does the browser show comments on the page? (a) Yes (b) No
-
3.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Mango</li>
<li>Papaya</li>
</ul> -
4.🔗 Where does this link open?
<a href="contact.html">Maths fun</a> (a) in the same tab (b) in a new tab -
5.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="100"> (a) map.png (b) A red kite (c) kite.png (d) cake.jpg -
6.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> -
7.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>The red kite</p>
<p>Rain today</p> - 8.True or false: <ul> is one item of a list. (a) True (b) False
-
9.🔗 Which address opens when you click this link?
<a href="https://example.com">Maths fun</a> (a) maths.html (b) https://example.com (c) Maths fun (d) art.html -
10.🔍 Which line is missing its closing tag?
line 1: <h2>My pets
line 2: <h1>Rain today</h1>
line 3: <h3>My best friend</h3> (a) line 3 (b) line 1 (c) line 2 - 11.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
- 12.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
-
13.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>Fun facts</p>
<h2>My best friend</h2>
<p>My best friend</p> -
14.🔗 Where does this link open?
<a href="https://example.com">About us</a> (a) in the same tab (b) in a new tab -
15.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Grapes</li>
</ul> -
16.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Hello, world!</p> --> - 17.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h5>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
-
18.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>My best friend</p>
<h3>Our school trip</h3>
<p>The red kite</p>
<p>My best friend</p> - 19.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 20.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as one space (d) as a new line
- 21.🌐 Which one turns HTML into a page? (a) a web server (b) a web browser (c) a code editor
-
22.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Good morning!</p>
<p>My pets</p>
<p>Rain today</p>
<h2>The red kite</h2> - 23.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to load it faster (d) to describe the image
- 24.Which of these is an opening tag? (a) <title> (b) </p> (c) </title> (d) </li>
- 25.True or false: <li> is an unordered list. (a) True (b) False
- 26.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
-
27.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>I love mangoes.</p> -->
<!-- <p>Hello, world!</p> -->
<p>The red kite</p> - 28.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
- 29.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h4>? (a) <h6> (b) <h5> (c) <h1> (d) <h4>
- 30.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
-
31.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p>
<!-- <p>My best friend</p> --> -
32.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h3>Our school trip</h3>
<p>Hello, world!</p>
<p>Fun facts</p> - 33.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h3>? (a) <h6> (b) <h5> (c) <h3> (d) <h2>
- 34.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
35.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="300"> (a) dog.jpg (b) width (c) The full moon (d) A happy dog - 36.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <a href="about.html"> (d) <link about.html>
- 37.🔍 Which is the odd one out? (a) sends pages over the net (b) shows pages from the web (c) has an address bar (d) opens web pages for us
- 38.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
- 39.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h6>? (a) <h1> (b) <h6> (c) <h5> (d) <h3>
- 40.📄 Can HTML on its own make tables? (a) Yes (b) No
Answer key
- in the head
- No
- 3
- in the same tab
- kite.png
- 350
- 3
- False
- https://example.com
- line 1
- in the body
- a code editor
- 2
- in the same tab
- 2
- 2
- <h1>
- 2
- an empty tag
- as one space
- a web browser
- 4
- to describe the image
- <title>
- False
- in the body
- 1
- <h5>
- <h1>
- <a>
- 1
- 2
- <h2>
- has a closing tag
- A happy dog
- <a href="about.html">
- sends pages over the net
- <ol>
- <h6>
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids