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 text will NOT show on the page?
<p>Fun facts</p>
<p>Hello, world!</p>
<p>Good morning!</p>
<!-- <p>My best friend</p> --> (a) Good morning! (b) My best friend (c) Fun facts (d) Hello, world! - 2.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
-
3.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="100"> -
4.🔗 Which words do you click on?
<a href="https://example.com">Visit the site</a> (a) Maths fun (b) Visit the site (c) href (d) https://example.com -
5.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Our school trip</p> -->
<p>Hello, world!</p> - 6.🖼️ Which attribute of <img> describes the picture? (a) alt (b) src (c) height (d) width
- 7.🔢 In a basic web page file, which comes first: “</body>” or “</html>”? (a) </body> (b) </html>
- 8.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h3> or <h4>? (a) <h3> (b) <h4> (c) <h6> (d) <h2>
- 9.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
10.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> -->
<p>My best friend</p> -
11.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Papaya</li>
</ul> (a) numbers (b) bullets -
12.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="250"> (a) map.png (b) cake.jpg (c) kite.png (d) A red kite - 13.📝 What do we need to write HTML? (a) a microphone (b) a printer (c) a paintbrush (d) a plain text editor
-
14.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>The red kite</p> -->
<p>Rain today</p>
<p>My best friend</p> (a) Our school trip (b) The red kite (c) Rain today (d) My best friend - 15.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dollar $ (c) a dot . (d) a hash #
- 16.True or false: HTML on its own can pick a random number. (a) False (b) True
-
17.🔗 Which words do you click on?
<a href="news.html">Contact us</a> (a) Visit the site (b) news.html (c) href (d) Contact us - 18.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h4> or <h5>? (a) <h5> (b) <h4> (c) <h2> (d) <h6>
-
19.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="400"> -
20.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>The red kite</p> -->
<p>Hello, world!</p>
<p>My best friend</p> (a) My best friend (b) The red kite (c) Our school trip (d) Hello, world! - 21.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
-
22.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h3>The red kite</h3>
<h3>Hello, world!</h3> - 23.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 24.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
- 25.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <hr> (d) <ul>
- 26.🔍 Which is the odd one out? (a) has an address bar (b) turns HTML into a page (c) shows pages from the web (d) colours code to help us
- 27.True or false: <p> has a closing tag. (a) True (b) False
- 28.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <ol> (d) <li>
- 29.True or false: HTML on its own cannot make a form. (a) False (b) True
- 30.Which of these is an empty tag? (a) <li> (b) <br> (c) <h1> (d) <ul>
- 31.Which of these has a closing tag? (a) <input> (b) <img> (c) <hr> (d) <p>
- 32.💬 Does the browser show comments on the page? (a) No (b) Yes
-
33.🔗 Where does this link open?
<a href="https://example.com">Art corner</a> (a) in a new tab (b) in the same tab - 34.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <img> (c) <title> (d) <style>
-
35.🔗 Where does this link open?
<a href="quiz.html">About us</a> (a) in the same tab (b) in a new tab -
36.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p>
<p>I love mangoes.</p> (a) Cricket is fun. (b) I love mangoes. (c) The red kite -
37.🔗 Where does this link open?
<a href="games.html">Take the quiz</a> (a) in the same tab (b) in a new tab -
38.🔠 How many headings are in this code?
<h1>My pets</h1>
<h3>Hello, world!</h3>
<h3>Cricket is fun.</h3> -
39.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Fun facts</h2>
<h2>The red kite</h2>
<p>Our school trip</p>
<p>Good morning!</p> - 40.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
Answer key
- My best friend
- <a>
- 100
- Visit the site
- 1
- alt
- </body>
- <h2>
- No
- 3
- bullets
- kite.png
- a plain text editor
- The red kite
- a slash /
- False
- Contact us
- <h6>
- 400
- The red kite
- True
- 3
- True
- a web browser
- <ul>
- colours code to help us
- True
- <li>
- False
- <br>
- <p>
- No
- in the same tab
- <img>
- in the same tab
- Cricket is fun.
- in the same tab
- 3
- 3
- 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids