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 address opens when you click this link?
<a href="news.html">Maths fun</a> (a) Maths fun (b) games.html (c) quiz.html (d) news.html - 2.Which of these is true of a web server? (a) saves our .html files (b) shows pages from the web (c) opens web pages for us (d) sends pages over the net
- 3.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 4.Which of these goes in the head? (a) <ul> (b) <p> (c) <meta charset="utf-8"> (d) <h1>
-
5.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h3>Hello, world!</h3>
<h4>My pets</h4>
<h4>Our school trip</h4>
<p>Our school trip</p> - 6.True or false: <b> has a closing tag. (a) True (b) False
-
7.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>Rain today</h2>
<p>Rain today</p>
<h2>My pets</h2> - 8.Which of these has a closing tag? (a) <h1> (b) <img> (c) <br> (d) <meta>
-
9.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> -->
<p>The red kite</p> (a) I love mangoes. (b) The red kite (c) Hello, world! - 10.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
-
11.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Banana</li>
<li>Jamun</li>
</ol> (a) bullets (b) numbers - 12.True or false: <img> goes in the body. (a) True (b) False
- 13.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 14.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h5> or <h1>? (a) <h5> (b) <h4> (c) <h2> (d) <h1>
-
15.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow<br>Roses are red<br>Birds sing<br>Kites fly high</p> - 16.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
- 17.🔢 In a basic web page file, which comes first: “</body>” or “</head>”? (a) </body> (b) </head>
-
18.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>The red kite</p>
<h2>Our school trip</h2>
<h2>I love mangoes.</h2> -
19.🔗 Where does this link open?
<a href="https://example.com">Take the quiz</a> (a) in the same tab (b) in a new tab -
20.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>My pets</p> - 21.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <img> (d) <p>
-
22.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> -
23.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) tiger.jpg (b) A tiger asleep (c) A red kite (d) width - 24.True or false: <hr> is an empty tag. (a) False (b) True
-
25.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="150"> - 26.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) height (d) alt
- 27.True or false: in <img>, src tells which image to load. (a) False (b) True
- 28.True or false: in <img>, height is read by screen readers. (a) True (b) False
- 29.Which of these is an opening tag? (a) </h1> (b) <b> (c) </body> (d) </title>
- 30.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Machine (d) Markup
-
31.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Papaya</li>
<li>Grapes</li>
<li>Mango</li>
</ol> -
32.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Banana</li>
<li>Orange</li>
<li>Litchi</li>
<li>Guava</li>
<li>Grapes</li>
</ol> -
33.🔗 Where does this link open?
<a href="art.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab -
34.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) All about me (c) Space Facts (d) index.html - 35.Which of these goes in the head? (a) <p> (b) <table> (c) <ul> (d) <style>
- 36.Which of these is an opening tag? (a) </body> (b) </h1> (c) <p> (d) </p>
-
37.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine</p> -
38.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>The red kite</p>
<h3>I love mangoes.</h3>
<h3>My best friend</h3> -
39.🔗 Which address opens when you click this link?
<a href="https://example.com">Visit the site</a> (a) https://example.com (b) maths.html (c) Visit the site (d) art.html - 40.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
Answer key
- news.html
- sends pages over the net
- a closing tag
- <meta charset="utf-8">
- 4
- True
- 2
- <h1>
- Hello, world!
- -->
- numbers
- True
- in the head
- <h1>
- 5
- in the body
- </head>
- 3
- in the same tab
- 1
- <img>
- 250
- A tiger asleep
- True
- 150
- src
- True
- False
- <b>
- Markup
- 2
- 6
- in a new tab
- Space Facts
- <style>
- <p>
- 2
- 3
- https://example.com
- in the body
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids