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.🔍 One closing tag is missing. Which one?
<i>Rain today
<h2>Cricket is fun.</h2>
<small>My pets</small> (a) </h1> (b) </h2> (c) </i> (d) </small> - 2.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 3.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 4.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) id (d) href
- 5.True or false: a web browser sends pages over the net. (a) False (b) True
- 6.True or false: HTML on its own can make a form. (a) False (b) True
-
7.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="200"> - 8.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <!DOCTYPE html> (d) <body>
- 9.True or false: <input> has a closing tag. (a) False (b) True
-
10.🔍 One closing tag is missing. Which one?
<strong>I love mangoes.
<h2>Fun facts</h2>
<p>The red kite</p> (a) </p> (b) </small> (c) </h2> (d) </strong> - 11.📄 Where does the text of <title> appear? (a) in a big heading (b) at the bottom (c) on the browser tab (d) nowhere
- 12.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
-
13.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>I love mangoes.</p>
<h2>My best friend</h2>
<h2>Fun facts</h2>
<p>Hello, world!</p> - 14.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h4>? (a) <h3> (b) <h2> (c) <h4> (d) <h1>
- 15.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as a new line (d) as 5 spaces
- 16.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
-
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="350"> (a) width (b) A tiger asleep (c) An old fort (d) fort.jpg -
18.🔗 Which address opens when you click this link?
<a href="games.html">About us</a> (a) contact.html (b) about.html (c) games.html (d) About us - 19.True or false: HTML on its own cannot add up two numbers. (a) False (b) True
- 20.Which of these is true of a code editor? (a) turns HTML into a page (b) shows pages from the web (c) has an address bar (d) colours code to help us
- 21.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 22.Which of these has a closing tag? (a) <meta> (b) <img> (c) <title> (d) <input>
- 23.True or false: <ul> lists things in any order. (a) False (b) True
-
24.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Hello, world!</p>
<p>My best friend</p>
<h2>Fun facts</h2>
<h2>Rain today</h2>
<p>Cricket is fun.</p> - 25.Which of these goes in the head? (a) <table> (b) <ul> (c) <img> (d) <style>
-
26.🔗 Where does this link open?
<a href="about.html">School news</a> (a) in a new tab (b) in the same tab -
27.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>Rain today</p> -->
<p>Our school trip</p> -
28.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Fun facts</p> -->
<!-- <p>Good morning!</p> --> -
29.🔗 Where does this link open?
<a href="news.html" target="_blank">Take the quiz</a> (a) in the same tab (b) in a new tab - 30.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
-
31.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) Welcome! (c) index.html (d) Class 7 Blog - 32.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
- 33.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h3> or <h5>? (a) <h1> (b) <h4> (c) <h5> (d) <h3>
-
34.🔗 Which words do you click on?
<a href="about.html">School news</a> (a) School news (b) about.html (c) Take the quiz (d) href -
35.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Good morning!</p>
<p>Hello, world!</p> - 36.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
- 37.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
38.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Banana</li>
<li>Guava</li>
</ol> (a) numbers (b) bullets -
39.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h2>Rain today</h2>
<p>Hello, world!</p> - 40.Which of these is an opening tag? (a) </p> (b) </b> (c) <p> (d) </title>
Answer key
- </i>
- has a closing tag
- Yes
- href
- False
- True
- 200
- <!DOCTYPE html>
- False
- </strong>
- on the browser tab
- a code editor
- 3
- <h1>
- as one space
- 1
- An old fort
- games.html
- True
- colours code to help us
- has a closing tag
- <title>
- True
- 4
- <style>
- in the same tab
- 1
- 1
- in a new tab
- <ul>
- Class 7 Blog
- <li>
- <h5>
- School news
- 2
- <ol>
- No
- numbers
- 2
- <p>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids