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.True or false: HTML on its own can run a game loop. (a) True (b) False
- 2.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) attribute (d) element
- 3.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 4.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
- 5.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 6.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to colour it (d) to make it bigger
- 7.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h3> (d) <h1>
-
8.🔗 Which words do you click on?
<a href="art.html">Play games</a> (a) art.html (b) About us (c) href (d) Play games - 9.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
- 10.Which of these is true of a web browser? (a) saves our .html files (b) colours code to help us (c) turns HTML into a page (d) sends pages over the net
-
11.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Grapes</li>
<li>Mango</li>
</ol> - 12.True or false: <a> goes in the head. (a) False (b) True
- 13.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as a dot (c) as one space (d) as 5 spaces
- 14.🔢 In a basic web page file, which comes LAST? (a) </body> (b) </head> (c) </html> (d) <body>
- 15.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
16.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="200"> (a) kite.png (b) width (c) Map of India (d) A red kite -
17.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>My drawings</h1>
<p>I like to read.</p>
</body>
</html> (a) My drawings (b) I like to read. (c) index.html (d) Cricket Club - 18.True or false: a web server is where we type code. (a) False (b) True
- 19.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
- 20.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
- 21.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) height (c) width (d) alt
- 22.True or false: <li> goes inside ul or ol. (a) True (b) False
-
23.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h3>I love mangoes.</h3>
<p>I love mangoes.</p> - 24.💬 How does an HTML comment start? (a) <!-- (b) /* (c) // (d) #
-
25.🔗 Which address opens when you click this link?
<a href="quiz.html">About us</a> (a) quiz.html (b) About us (c) about.html (d) games.html - 26.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
- 27.Which of these has a closing tag? (a) <hr> (b) <br> (c) <meta> (d) <li>
- 28.Which of these is true of a web browser? (a) has an address bar (b) sends pages over the net (c) is where we type code (d) answers page requests
- 29.📄 Can HTML on its own make headings? (a) Yes (b) No
- 30.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
31.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h4>Rain today</h4>
<p>Hello, world!</p>
<h2>My pets</h2> - 32.Which of these goes in the head? (a) <ul> (b) <style> (c) <h1> (d) <img>
-
33.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Rain today</p>
<h2>My pets</h2>
<h2>The red kite</h2> -
34.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>Cricket is fun.</h2>
<h2>Our school trip</h2>
<p>Hello, world!</p>
<h2>Hello, world!</h2> - 35.Which of these goes in the head? (a) <table> (b) <p> (c) <meta charset="utf-8"> (d) <ul>
- 36.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 37.Which of these is an empty tag? (a) <b> (b) <p> (c) <ul> (d) <input>
-
38.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Litchi</li>
<li>Guava</li>
<li>Orange</li>
<li>Grapes</li>
</ol> - 39.True or false: <ul> lists steps in order. (a) True (b) False
- 40.Which of these has a closing tag? (a) <p> (b) <input> (c) <meta> (d) <br>
Answer key
- False
- element
- has a closing tag
- a web browser
- in the head
- to describe the image
- <h6>
- Play games
- in the body
- turns HTML into a page
- 3
- False
- as one space
- </html>
- has a closing tag
- A red kite
- Cricket Club
- False
- <ul>
- a web browser
- alt
- True
- 2
- <!--
- quiz.html
- in the body
- <li>
- has an address bar
- Yes
- an empty tag
- 3
- <style>
- 2
- 2
- <meta charset="utf-8">
- Yes
- <input>
- 5
- False
- <p>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids