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.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) My Hobbies (c) All about me (d) index.html -
2.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Hello, world!</p>
<h2>I love mangoes.</h2>
<h2>Our school trip</h2> - 3.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <img> (d) <pic>
-
4.🔗 Which address opens when you click this link?
<a href="games.html">Art corner</a> (a) games.html (b) Art corner (c) about.html (d) contact.html -
5.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Banana</li>
<li>Grapes</li>
<li>Orange</li>
<li>Papaya</li>
<li>Jamun</li>
</ol> - 6.True or false: a web server sends pages over the net. (a) True (b) False
- 7.🔍 Which is the odd one out? (a) has an address bar (b) colours code to help us (c) turns HTML into a page (d) shows pages from the web
- 8.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) alt (d) width
-
9.🔗 Which address opens when you click this link?
<a href="maths.html">Visit the site</a> (a) maths.html (b) news.html (c) art.html (d) Visit the site - 10.True or false: a code editor hosts websites online. (a) True (b) False
-
11.🔗 Where does this link open?
<a href="https://example.com">Take the quiz</a> (a) in a new tab (b) in the same tab - 12.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <hr> (d) <br>
-
13.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p>
<p>Cricket is fun.</p> -
14.🔗 Which address opens when you click this link?
<a href="contact.html">About us</a> (a) maths.html (b) https://example.com (c) contact.html (d) About us - 15.True or false: in <img>, alt tells which image to load. (a) False (b) True
-
16.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p>
<p>Fun facts</p> (a) Cricket is fun. (b) The red kite (c) I love mangoes. (d) Fun facts -
17.🔗 Where does this link open?
<a href="contact.html" target="_blank">School news</a> (a) in a new tab (b) in the same tab - 18.🔢 In a basic web page file, which comes first: “<head>” or “</body>”? (a) </body> (b) <head>
-
19.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Rain today</p>
<p>The red kite</p> (a) Rain today (b) The red kite (c) Our school trip -
20.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Here is my best one.</p>
</body>
</html> (a) index.html (b) My Hobbies (c) Easy snacks (d) Here is my best one. - 21.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h3>? (a) <h2> (b) <h6> (c) <h3> (d) <h1>
- 22.Which of these is true of a web server? (a) sends pages over the net (b) shows pages from the web (c) turns HTML into a page (d) shows line numbers
-
23.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Grapes</li>
<li>Orange</li>
</ol> (a) bullets (b) numbers -
24.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) My best friend (c) Rain today (d) Cricket is fun. - 25.💬 Does the browser show comments on the page? (a) No (b) Yes
- 26.True or false: a web browser answers page requests. (a) False (b) True
- 27.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
28.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Our school trip</p>
<h2>My best friend</h2> - 29.True or false: HTML on its own can pick a random number. (a) False (b) True
-
30.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p> - 31.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) </h1> (c) <h1/> (d) <h1>
-
32.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>My drawings</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) My drawings (b) Thanks for visiting. (c) Cricket Club (d) body - 33.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h3> or <h2>? (a) <h3> (b) <h6> (c) <h2> (d) <h4>
- 34.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 35.True or false: HTML on its own can add pictures to a page. (a) True (b) False
- 36.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
37.🔍 One closing tag is missing. Which one?
<h2>Good morning!</h2>
<b>Cricket is fun.</b>
<small>Hello, world! (a) </small> (b) </h2> (c) </b> (d) </u> - 38.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h1> (d) <h3>
- 39.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
-
40.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="250"> (a) moon.png (b) cake.jpg (c) dog.jpg (d) Birthday cake
Answer key
- My Hobbies
- 3
- <img>
- games.html
- 6
- True
- colours code to help us
- alt
- maths.html
- False
- in the same tab
- <ol>
- 2
- contact.html
- False
- The red kite
- in a new tab
- <head>
- Our school trip
- My Hobbies
- <h6>
- sends pages over the net
- numbers
- Cricket is fun.
- No
- False
- a closing tag
- 2
- False
- 1
- </h1>
- My drawings
- <h6>
- an empty tag
- True
- a closing tag
- </small>
- <h6>
- -->
- cake.jpg
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids