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.💬 How does an HTML comment end? (a) */ (b) // (c) --> (d) >>
-
2.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p>
<p>The red kite</p> (a) I love mangoes. (b) The red kite (c) Rain today (d) Our school trip - 3.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h2> or <h1>? (a) <h1> (b) <h5> (c) <h3> (d) <h2>
- 4.Which of these goes in the head? (a) <ul> (b) <h1> (c) <p> (d) <meta charset="utf-8">
-
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) width (b) dog.jpg (c) The full moon (d) A happy dog - 6.Which of these is a closing tag? (a) <b> (b) </title> (c) <p> (d) <h1>
- 7.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
-
8.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h2>Our school trip</h2>
<p>I love mangoes.</p>
<p>Fun facts</p> - 9.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dot . (c) a dollar $ (d) a hash #
- 10.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
-
11.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Guava</li>
<li>Mango</li>
</ol> (a) bullets (b) numbers -
12.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Rain today</p>
<h2>Our school trip</h2>
<h2>Cricket is fun.</h2>
<p>Cricket is fun.</p>
<p>My best friend</p> - 13.🔗 What does HyperText mean? (a) secret text (b) text in colour (c) text with links (d) very big text
-
14.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Good morning!</p>
<p>Hello, world!</p> (a) Hello, world! (b) Rain today (c) Good morning! -
15.🔗 Where does this link open?
<a href="about.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 16.True or false: <ol> goes inside ul or ol. (a) True (b) False
- 17.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) address (d) attribute
- 18.🔢 In a basic web page file, which comes LAST? (a) </html> (b) </body> (c) <!DOCTYPE html> (d) <html>
-
19.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing</p> -
20.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>I love mangoes.</p>
<h3>I love mangoes.</h3> -
21.📋 What number does the browser show next to “Papaya”?
<ol start="6">
<li>Grapes</li>
<li>Orange</li>
<li>Papaya</li>
</ol> - 22.True or false: <input> is an empty tag. (a) False (b) True
- 23.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to load it faster (d) to make it bigger
-
24.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="400"> (a) width (b) An old fort (c) A tiger asleep (d) fort.jpg - 25.Which of these is true of a code editor? (a) has an address bar (b) hosts websites online (c) saves our .html files (d) turns HTML into a page
- 26.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) src (d) width
- 27.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
- 28.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
- 29.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
- 30.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the body (d) the title
- 31.💬 Why do coders write comments? (a) to leave notes (b) to add colour (c) to make links (d) to show pictures
- 32.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
-
33.🔗 Which words do you click on?
<a href="about.html">Maths fun</a> (a) Maths fun (b) href (c) Art corner (d) about.html - 34.Which of these is true of a web browser? (a) saves our .html files (b) turns HTML into a page (c) colours code to help us (d) hosts websites online
- 35.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
-
36.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Good morning!</p>
<p>Rain today</p> - 37.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
- 38.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
39.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> -->
<p>My pets</p>
<p>Our school trip</p> (a) Our school trip (b) Hello, world! (c) My pets (d) I love mangoes. -
40.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Banana</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets
Answer key
- -->
- Our school trip
- <h1>
- <meta charset="utf-8">
- A happy dog
- </title>
- 1
- 2
- a slash /
- <ul>
- numbers
- 4
- text with links
- Rain today
- in a new tab
- False
- element
- </html>
- 2
- 2
- 8
- True
- to describe the image
- An old fort
- saves our .html files
- alt
- True
- opens it in a new tab
- False
- the body
- to leave notes
- <a>
- Maths fun
- turns HTML into a page
- a web server
- 1
- in the head
- No
- I love mangoes.
- bullets
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids