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.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
2.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>Rain today</p>
<h3>Good morning!</h3>
<p>The red kite</p>
<p>The red kite</p> - 3.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) address (d) attribute
- 4.Which of these is an empty tag? (a) <ul> (b) <img> (c) <p> (d) <h1>
- 5.🔗 Which attribute holds the address of a link? (a) href (b) id (c) alt (d) src
- 6.📝 What does <br> do? (a) makes a list (b) adds a picture (c) makes text bold (d) starts a new line
-
7.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>The red kite</p>
<!-- <p>My pets</p> --> (a) My pets (b) The red kite (c) Our school trip - 8.True or false: a code editor sends pages over the net. (a) True (b) False
- 9.🔍 Which is the odd one out? (a) shows line numbers (b) turns HTML into a page (c) shows pages from the web (d) has an address bar
- 10.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
- 11.True or false: a web server is where we type code. (a) False (b) True
-
12.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Cricket is fun.</p>
<!-- <p>My pets</p> --> - 13.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to make it bigger (d) to colour it
-
14.🔍 One closing tag is missing. Which one?
<em>The red kite</em>
<small>Cricket is fun.</small>
<i>My pets (a) </small> (b) </em> (c) </b> (d) </i> - 15.True or false: HTML on its own can pick a random number. (a) False (b) True
- 16.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <p> (d) <li>
-
17.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Banana</li>
<li>Papaya</li>
</ul> (a) numbers (b) bullets - 18.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
- 19.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
- 20.True or false: <ol> lists things in any order. (a) True (b) False
-
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="300"> (a) A tiger asleep (b) fort.jpg (c) width (d) An old fort -
22.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h3>Good morning!</h3>
<h4>Rain today</h4>
<p>Hello, world!</p>
<h2>My pets</h2> - 23.🔍 Which is the odd one out? (a) has an address bar (b) turns HTML into a page (c) colours code to help us (d) shows pages from the web
-
24.🔍 One closing tag is missing. Which one?
<i>My pets</i>
<u>Fun facts</u>
<em>Rain today (a) </i> (b) </em> (c) </u> (d) </strong> - 25.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
- 26.Which of these is true of a web browser? (a) answers page requests (b) opens web pages for us (c) colours code to help us (d) sends pages over the net
- 27.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h6> or <h5>? (a) <h1> (b) <h2> (c) <h6> (d) <h5>
-
28.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h3>Good morning!</h3>
<p>Hello, world!</p> - 29.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
- 30.Which of these is a closing tag? (a) <p> (b) <li> (c) </p> (d) <title>
- 31.True or false: in <img>, width names the picture file. (a) False (b) True
- 32.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
- 33.Which of these has a closing tag? (a) <hr> (b) <ul> (c) <meta> (d) <br>
-
34.🔗 Which words do you click on?
<a href="about.html">Maths fun</a> (a) about.html (b) href (c) Maths fun (d) Art corner - 35.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h6> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
-
36.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>My pets</p>
<h2>The red kite</h2> -
37.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="250"> - 38.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
- 39.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h2> or <h5>? (a) <h3> (b) <h6> (c) <h2> (d) <h5>
- 40.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) { (d) [
Answer key
- No
- 2
- element
- <img>
- href
- starts a new line
- My pets
- False
- shows line numbers
- <ol>
- False
- 2
- to describe the image
- </i>
- False
- <li>
- bullets
- on the browser tab
- a web browser
- False
- An old fort
- 4
- colours code to help us
- </em>
- <h1>
- opens web pages for us
- <h6>
- 2
- to leave notes
- </p>
- False
- <!DOCTYPE html>
- <ul>
- Maths fun
- <h6>
- 2
- 250
- <ol>
- <h2>
- <
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids