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.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high<br>Stars shine<br>Rivers flow</p> - 2.Which of these is an opening tag? (a) <h1> (b) </p> (c) </h1> (d) </title>
- 3.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
- 4.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <p> (d) <link>
-
5.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>My pets</p>
<p>My pets</p>
<h2>The red kite</h2> -
6.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Rain today</h2>
<p>The red kite</p> -
7.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Easy snacks (b) index.html (c) Here is my best one. (d) Art Gallery -
8.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Jamun</li>
<li>Mango</li>
</ol> (a) bullets (b) numbers - 9.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
10.🔗 Which address opens when you click this link?
<a href="contact.html">Take the quiz</a> (a) https://example.com (b) Take the quiz (c) contact.html (d) maths.html -
11.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Fun facts</p>
<h2>Good morning!</h2>
<h2>Good morning!</h2>
<p>Good morning!</p>
<p>My pets</p> - 12.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
- 13.True or false: <title> goes in the body. (a) True (b) False
- 14.Which of these is true of a web server? (a) colours code to help us (b) is where we type code (c) hosts websites online (d) has an address bar
-
15.🔗 Which words do you click on?
<a href="about.html">Take the quiz</a> (a) about.html (b) Play games (c) Take the quiz (d) href - 16.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <p> (d) <br>
- 17.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
- 18.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) height (d) alt
- 19.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <style> (d) <table>
-
20.🔗 Where does this link open?
<a href="about.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab -
21.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>I love mangoes.</p> --> - 22.🔤 In “HTML”, what does the L stand for? (a) Link (b) Language (c) Laptop (d) Line
-
23.🔗 Which words do you click on?
<a href="art.html">Play games</a> (a) href (b) art.html (c) About us (d) Play games - 24.True or false: <li> is an empty tag. (a) True (b) False
- 25.🔢 In a basic web page file, which comes LAST? (a) <body> (b) </body> (c) </head> (d) </html>
- 26.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
27.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="300"> -
28.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Grapes</li>
<li>Litchi</li>
<li>Jamun</li>
</ol> - 29.Which of these goes in the head? (a) <ul> (b) <style> (c) <table> (d) <h1>
-
30.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<!-- <p>My pets</p> -->
<!-- <p>Our school trip</p> --> - 31.True or false: <p> is an empty tag. (a) True (b) False
- 32.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <body> (b) <!DOCTYPE html>
- 33.💬 Does the browser show comments on the page? (a) Yes (b) No
- 34.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
-
35.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>I love mangoes.</p>
<p>The red kite</p>
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p> - 36.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
- 37.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h4> or <h5>? (a) <h5> (b) <h4> (c) <h2> (d) <h6>
- 38.True or false: <ul> shows bullet points. (a) True (b) False
- 39.Which of these is true of a code editor? (a) opens web pages for us (b) shows line numbers (c) has an address bar (d) hosts websites online
-
40.🔍 One closing tag is missing. Which one?
<h3>My pets</h3>
<b>Good morning!
<p>Hello, world!</p> (a) </h3> (b) </p> (c) </b> (d) </h1>
Answer key
- 4
- <h1>
- <ul>
- <a>
- 3
- 2
- Art Gallery
- numbers
- a closing tag
- contact.html
- 4
- in the head
- False
- hosts websites online
- Take the quiz
- <h1>
- <li>
- alt
- <table>
- in a new tab
- 1
- Language
- Play games
- False
- </html>
- a closing tag
- 300
- 4
- <style>
- 1
- False
- <!DOCTYPE html>
- No
- <!--
- 4
- False
- <h2>
- True
- shows line numbers
- </b>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids