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 of these is true of a web browser? (a) is where we type code (b) answers page requests (c) hosts websites online (d) turns HTML into a page
- 2.True or false: a code editor answers page requests. (a) True (b) False
-
3.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Planets</h1>
<p>Here is my best one.</p>
</body>
</html> (a) body (b) Here is my best one. (c) Planets (d) Art Gallery - 4.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
- 5.Which of these is an empty tag? (a) <h1> (b) <ul> (c) <img> (d) <li>
- 6.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
7.🔗 Which words do you click on?
<a href="https://example.com">Visit the site</a> (a) https://example.com (b) href (c) Maths fun (d) Visit the site - 8.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h6>? (a) <h4> (b) <h1> (c) <h5> (d) <h6>
- 9.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
-
10.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Birds sing<br>Roses are red<br>Sky is blue<br>Kites fly high</p> - 11.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 12.🏷️ Which is the closing tag for <p>? (a) <\p> (b) </p> (c) <p/> (d) <p>
- 13.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <html> (c) </head> (d) <head>
-
14.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Kites fly high<br>Birds sing<br>Roses are red<br>Stars shine</p> - 15.True or false: <li> shows bullet points. (a) True (b) False
- 16.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
- 17.🧱 HTML gives a web page its ___. (a) colours (b) sound (c) structure (d) speed
- 18.Which of these has a closing tag? (a) <input> (b) <br> (c) <h1> (d) <hr>
- 19.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
-
20.🔗 Where does this link open?
<a href="news.html" target="_blank">Visit the site</a> (a) in the same tab (b) in a new tab - 21.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h5> or <h3>? (a) <h6> (b) <h3> (c) <h5> (d) <h2>
- 22.📄 Can HTML on its own run a game loop? (a) Yes (b) No
- 23.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
-
24.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>Rain today</p> -->
<p>My pets</p> -
25.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) A happy dog (b) Birthday cake (c) width (d) cake.jpg - 26.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 27.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <strong/> (c) <\strong> (d) </strong>
- 28.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) </head> (c) <!DOCTYPE html> (d) <body>
-
29.🔗 Which address opens when you click this link?
<a href="games.html">About us</a> (a) about.html (b) games.html (c) contact.html (d) About us - 30.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
- 31.True or false: <p> goes in the head. (a) True (b) False
- 32.🔤 In “HTML”, what does the L stand for? (a) Link (b) Language (c) Line (d) Laptop
-
33.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>My best friend</p>
<h2>The red kite</h2> -
34.🔗 Which address opens when you click this link?
<a href="https://example.com">Contact us</a> (a) art.html (b) maths.html (c) Contact us (d) https://example.com - 35.🏷️ Which is the closing tag for <i>? (a) <i/> (b) <i> (c) <\i> (d) </i>
- 36.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 37.Which of these is true of a web server? (a) shows line numbers (b) stores a website’s files (c) has an address bar (d) shows pages from the web
-
38.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>Hello, world!</p>
<p>Hello, world!</p>
<p>My best friend</p> - 39.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the doctype (d) the head
- 40.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) High Tech (c) HyperText (d) Home Text
Answer key
- turns HTML into a page
- False
- Planets
- href
- <img>
- a closing tag
- Visit the site
- <h1>
- <!DOCTYPE html>
- 5
- in the head
- </p>
- </html>
- 5
- False
- <h1>
- structure
- <h1>
- to leave notes
- in a new tab
- <h6>
- No
- <ul>
- 1
- Birthday cake
- No
- </strong>
- <!DOCTYPE html>
- games.html
- in the body
- False
- Language
- 2
- https://example.com
- </i>
- in the head
- stores a website’s files
- 1
- the body
- HyperText
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids