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.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
2.🔗 Which address opens when you click this link?
<a href="games.html">Play games</a> (a) contact.html (b) Play games (c) about.html (d) games.html -
3.🔗 Where does this link open?
<a href="contact.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab -
4.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Fun facts</p>
<h2>Our school trip</h2>
<p>My pets</p>
<p>I love mangoes.</p>
<p>My pets</p> - 5.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
- 6.💾 A web page file usually ends with which extension? (a) .txt (b) .mp3 (c) .png (d) .html
- 7.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
- 8.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 9.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 10.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h1> (d) <h6>
- 11.Which of these is an empty tag? (a) <p> (b) <img> (c) <title> (d) <ul>
-
12.🔍 One closing tag is missing. Which one?
<em>My pets</em>
<i>I love mangoes.
<h3>Hello, world!</h3> (a) </h3> (b) </p> (c) </em> (d) </i> - 13.True or false: <li> goes inside ul or ol. (a) False (b) True
-
14.🔗 Where does this link open?
<a href="https://example.com">Play games</a> (a) in a new tab (b) in the same tab - 15.Which of these is an empty tag? (a) <hr> (b) <li> (c) <ul> (d) <title>
-
16.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>Try this poha.</p>
</body>
</html> (a) body (b) My drawings (c) Try this poha. (d) Class 7 Blog - 17.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 10 (d) 6
- 18.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) attribute (d) address
- 19.📄 Which part holds everything you see on the page? (a) the doctype (b) the head (c) the title (d) the body
- 20.📄 Can HTML on its own make headings? (a) No (b) Yes
- 21.Which of these is true of a web server? (a) saves our .html files (b) shows line numbers (c) sends pages over the net (d) colours code to help us
- 22.🔍 Which is the odd one out? (a) saves our .html files (b) shows line numbers (c) has an address bar (d) colours code to help us
- 23.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h3> or <h1>? (a) <h6> (b) <h1> (c) <h3> (d) <h4>
-
24.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h4>My pets</h4>
<p>Fun facts</p>
<p>My best friend</p>
<h2>Rain today</h2> - 25.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
- 26.💬 Does the browser show comments on the page? (a) Yes (b) No
- 27.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h4> or <h6>? (a) <h2> (b) <h6> (c) <h4> (d) <h1>
-
28.📋 What number does the browser show next to “Mango”?
<ol>
<li>Litchi</li>
<li>Mango</li>
<li>Banana</li>
</ol> - 29.Which of these is true of a web browser? (a) saves our .html files (b) sends pages over the net (c) turns HTML into a page (d) stores a website’s files
- 30.📄 Can HTML on its own keep a high score? (a) Yes (b) No
-
31.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Jamun</li>
</ol> (a) bullets (b) numbers -
32.🔗 Which address opens when you click this link?
<a href="about.html">School news</a> (a) contact.html (b) about.html (c) School news (d) https://example.com -
33.🔗 Where does this link open?
<a href="quiz.html">Play games</a> (a) in a new tab (b) in the same tab - 34.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h2> or <h1>? (a) <h4> (b) <h1> (c) <h2> (d) <h6>
-
35.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>The red kite</p>
<p>Fun facts</p>
<h2>My pets</h2>
<h2>Cricket is fun.</h2>
<p>Fun facts</p> -
36.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="50"> - 37.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 38.True or false: in <img>, src shows if the image fails. (a) False (b) True
- 39.True or false: <ul> has a closing tag. (a) True (b) False
- 40.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
Answer key
- a closing tag
- games.html
- in a new tab
- 5
- 6
- .html
- -->
- Yes
- No
- <h6>
- <img>
- </i>
- True
- in the same tab
- <hr>
- My drawings
- 1
- element
- the body
- Yes
- sends pages over the net
- has an address bar
- <h6>
- 3
- to leave notes
- No
- <h6>
- 2
- turns HTML into a page
- No
- numbers
- about.html
- in the same tab
- <h1>
- 4
- 50
- an empty tag
- False
- True
- has a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids