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.True or false: <br> has a closing tag. (a) False (b) True
- 2.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h1> or <h5>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
- 3.True or false: <ol> shows bullet points. (a) False (b) True
-
4.🔍 One closing tag is missing. Which one?
<h1>Good morning!</h1>
<u>Hello, world!</u>
<i>Rain today (a) </h1> (b) </u> (c) </strong> (d) </i> - 5.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <p> (c) <style> (d) <title>
- 6.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) </html> (b) <!DOCTYPE html>
- 7.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 8.📝 What does <p> make? (a) a table (b) a link (c) a paragraph (d) a picture
-
9.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>My pets</p>
<h2>Fun facts</h2> -
10.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="50"> -
11.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Orange</li>
</ul> (a) numbers (b) bullets -
12.🔗 Which words do you click on?
<a href="art.html">Take the quiz</a> (a) href (b) Play games (c) Take the quiz (d) art.html -
13.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>The red kite</p> -->
<p>Fun facts</p>
<p>My pets</p> (a) Fun facts (b) Cricket is fun. (c) My pets (d) The red kite -
14.🔗 Which address opens when you click this link?
<a href="about.html">School news</a> (a) about.html (b) https://example.com (c) contact.html (d) School news - 15.🌐 Which one hosts websites online? (a) a code editor (b) a web browser (c) a web server
- 16.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
-
17.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>My pets</p> -->
<p>Fun facts</p> -
18.🔍 Which line is missing its closing tag?
line 1: <h1>My pets
line 2: <h3>The red kite</h3>
line 3: <u>My best friend</u> (a) line 3 (b) line 2 (c) line 1 -
19.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Litchi</li>
</ul> (a) bullets (b) numbers - 20.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) <\h2> (c) </h2> (d) <h2>
- 21.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
-
22.🔗 Which words do you click on?
<a href="quiz.html">Contact us</a> (a) href (b) Visit the site (c) Contact us (d) quiz.html -
23.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="400"> (a) moon.png (b) fort.jpg (c) bus.jpg (d) The full moon -
24.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Jamun</li>
</ul> - 25.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
- 26.True or false: a code editor opens web pages for us. (a) True (b) False
-
27.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Hello, world!</p>
<h4>I love mangoes.</h4> - 28.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
29.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Litchi</li>
</ol> (a) bullets (b) numbers -
30.🔗 Where does this link open?
<a href="about.html" target="_blank">School news</a> (a) in a new tab (b) in the same tab - 31.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
-
32.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Orange</li>
</ul> - 33.🔍 Which is the odd one out? (a) shows pages from the web (b) is where we type code (c) has an address bar (d) opens web pages for us
- 34.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
- 35.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 10 (c) 6 (d) 1
- 36.True or false: HTML on its own cannot make links to pages. (a) True (b) False
-
37.📄 What does the browser tab show for 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) index.html - 38.True or false: HTML on its own cannot count button clicks. (a) True (b) False
- 39.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
40.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="200"> (a) width (b) kite.png (c) Map of India (d) A red kite
Answer key
- False
- <h1>
- False
- </i>
- <p>
- <!DOCTYPE html>
- an opening tag
- a paragraph
- 2
- 50
- bullets
- Take the quiz
- The red kite
- about.html
- a web server
- <!DOCTYPE html>
- 2
- line 1
- bullets
- </h2>
- <ol>
- Contact us
- moon.png
- 2
- -->
- False
- 2
- an empty tag
- numbers
- in a new tab
- Yes
- 2
- is where we type code
- <a href="about.html">
- 1
- False
- Cricket Club
- True
- has a closing tag
- A red kite
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids