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 is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <h2> (d) <\h2>
-
2.🔗 Which words do you click on?
<a href="maths.html">School news</a> (a) School news (b) maths.html (c) href (d) Take the quiz - 3.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
- 4.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <li> (c) <ul>
- 5.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 1 (d) 10
- 6.🖼️ Which attribute of <img> names the picture file? (a) src (b) width (c) height (d) alt
- 7.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h6> or <h1>? (a) <h6> (b) <h1> (c) <h2> (d) <h4>
- 8.📄 Can HTML on its own keep a high score? (a) No (b) Yes
-
9.🔗 Where does this link open?
<a href="contact.html">About us</a> (a) in the same tab (b) in a new tab - 10.💬 Why do coders write comments? (a) to leave notes (b) to add colour (c) to show pictures (d) to make links
-
11.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="400"> (a) width (b) moon.png (c) The full moon (d) Our school bus -
12.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h4>Cricket is fun.</h4>
<h4>I love mangoes.</h4>
<h4>I love mangoes.</h4> - 13.True or false: <ul> shows bullet points. (a) False (b) True
-
14.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>I love mangoes.</p>
<!-- <p>Rain today</p> --> (a) I love mangoes. (b) Rain today (c) Fun facts -
15.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>My drawings</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) Thanks for visiting. (c) My drawings (d) Space Facts -
16.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<p>My best friend</p> (a) My best friend (b) Hello, world! (c) Cricket is fun. -
17.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>My pets</p> -->
<p>Fun facts</p> (a) Fun facts (b) Good morning! (c) My pets -
18.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>My pets</p>
<!-- <p>Rain today</p> --> (a) Rain today (b) My pets (c) Fun facts - 19.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
-
20.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Guava</li>
<li>Grapes</li>
</ul> (a) numbers (b) bullets - 21.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) height (c) src (d) alt
-
22.🔍 Which line is missing its closing tag?
line 1: <h3>Hello, world!</h3>
line 2: <strong>Our school trip</strong>
line 3: <em>Good morning! (a) line 1 (b) line 3 (c) line 2 -
23.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Hello, world!</p>
<h2>I love mangoes.</h2> - 24.Which of these is an opening tag? (a) </title> (b) </h1> (c) </li> (d) <body>
- 25.Which of these is true of a code editor? (a) turns HTML into a page (b) sends pages over the net (c) shows line numbers (d) shows pages from the web
- 26.📄 Where does the text of <title> appear? (a) in a big heading (b) at the bottom (c) on the browser tab (d) nowhere
- 27.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
28.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) body (b) Thanks for visiting. (c) All about me (d) Cricket Club - 29.🏷️ Which is the closing tag for <u>? (a) <u> (b) <\u> (c) <u/> (d) </u>
- 30.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h6>? (a) <h3> (b) <h5> (c) <h1> (d) <h6>
- 31.Which of these is a closing tag? (a) </li> (b) <li> (c) <body> (d) <p>
-
32.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) Contact us (b) games.html (c) Visit the site (d) href -
33.🔍 One closing tag is missing. Which one?
<i>Good morning!</i>
<em>My best friend</em>
<small>Cricket is fun. (a) </em> (b) </i> (c) </small> (d) </strong> - 34.📋 Which list tag is one item of a list? (a) <ol> (b) <ul> (c) <li>
- 35.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <meta charset="utf-8"> (d) <p>
- 36.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) height (c) src (d) width
- 37.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h2>? (a) <h1> (b) <h2> (c) <h5> (d) <h4>
-
38.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p>
<p>Our school trip</p>
<p>The red kite</p> (a) The red kite (b) Our school trip (c) Fun facts (d) Hello, world! - 39.True or false: HTML on its own cannot pick a random number. (a) False (b) True
-
40.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="200"> (a) kite.png (b) cake.jpg (c) A red kite (d) map.png
Answer key
- </h2>
- School news
- True
- <li>
- 1
- src
- <h1>
- No
- in the same tab
- to leave notes
- The full moon
- 4
- True
- Rain today
- Space Facts
- Hello, world!
- My pets
- Rain today
- <ol>
- bullets
- alt
- line 3
- 2
- <body>
- shows line numbers
- on the browser tab
- an opening tag
- All about me
- </u>
- <h1>
- </li>
- Contact us
- </small>
- <li>
- <p>
- src
- <h5>
- Hello, world!
- True
- kite.png
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids