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.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to describe the image (d) to colour it
- 2.True or false: in <img>, alt is read by screen readers. (a) True (b) False
- 3.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h3> or <h2>? (a) <h6> (b) <h4> (c) <h3> (d) <h2>
- 4.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 5.Which of these has a closing tag? (a) <p> (b) <meta> (c) <img> (d) <input>
- 6.🌐 Which one shows line numbers? (a) a code editor (b) a web server (c) a web browser
- 7.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h6> or <h4>? (a) <h3> (b) <h6> (c) <h4> (d) <h1>
-
8.🔗 Where does this link open?
<a href="games.html">Art corner</a> (a) in a new tab (b) in the same tab - 9.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h5>? (a) <h1> (b) <h2> (c) <h4> (d) <h5>
- 10.Which of these is an empty tag? (a) <title> (b) <p> (c) <b> (d) <input>
-
11.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="150"> - 12.Which of these is true of a web server? (a) is where we type code (b) colours code to help us (c) saves our .html files (d) hosts websites online
-
13.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>My best friend</p> -->
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>Cricket is fun.</p> --> - 14.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) < (d) {
-
15.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) A tiger asleep (b) width (c) tiger.jpg (d) A red kite -
16.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p>
<p>Rain today</p>
<p>The red kite</p> - 17.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h1> or <h5>? (a) <h5> (b) <h4> (c) <h1> (d) <h6>
-
18.🔗 Where does this link open?
<a href="games.html">About us</a> (a) in the same tab (b) in a new tab -
19.🔗 Where does this link open?
<a href="https://example.com">About us</a> (a) in a new tab (b) in the same tab - 20.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
- 21.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
- 22.True or false: <table> goes in the body. (a) True (b) False
- 23.Which of these is a closing tag? (a) <h1> (b) <body> (c) <b> (d) </p>
- 24.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 25.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) element (d) attribute
- 26.Which of these is a closing tag? (a) <li> (b) </h1> (c) <h1> (d) <p>
-
27.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>The red kite</p>
<!-- <p>Rain today</p> -->
<!-- <p>Fun facts</p> --> - 28.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
-
29.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Fun facts</p>
<!-- <p>My pets</p> -->
<p>Hello, world!</p> -
30.🔗 Which address opens when you click this link?
<a href="quiz.html">Art corner</a> (a) Art corner (b) about.html (c) games.html (d) quiz.html -
31.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>Our school trip</p> -->
<p>My pets</p>
<p>The red kite</p> -
32.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Grapes</li>
</ul> -
33.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="50"> (a) tiger.jpg (b) fort.jpg (c) kite.png (d) An old fort - 34.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h1>? (a) <h2> (b) <h3> (c) <h1> (d) <h4>
- 35.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 36.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h4>? (a) <h4> (b) <h3> (c) <h5> (d) <h1>
- 37.True or false: <p> goes in the body. (a) True (b) False
- 38.🔍 Which is the odd one out? (a) shows line numbers (b) is where we type code (c) turns HTML into a page (d) colours code to help us
-
39.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) Cricket Club (c) body (d) Welcome! - 40.🔍 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
Answer key
- to describe the image
- True
- <h2>
- an opening tag
- <p>
- a code editor
- <h6>
- in the same tab
- <h1>
- <input>
- 150
- hosts websites online
- 1
- <
- A tiger asleep
- 3
- <h1>
- in the same tab
- in the same tab
- <a>
- Yes
- True
- </p>
- a closing tag
- element
- </h1>
- 2
- in the body
- 3
- quiz.html
- 2
- 2
- fort.jpg
- <h1>
- has a closing tag
- <h5>
- True
- turns HTML into a page
- Welcome!
- colours code to help us
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids