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 a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a hash # (d) a dot .
-
2.🔍 One closing tag is missing. Which one?
<u>The red kite
<h1>My pets</h1>
<h2>Hello, world!</h2> (a) </h3> (b) </h1> (c) </u> (d) </h2> -
3.🔗 Where does this link open?
<a href="games.html" target="_blank">Maths fun</a> (a) in a new tab (b) in the same tab - 4.🌐 Which one saves our .html files? (a) a web server (b) a web browser (c) a code editor
- 5.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
- 6.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 7.🏷️ HTML marks up text using ___. (a) wires (b) keys (c) pixels (d) tags
-
8.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Match report (b) Here is my best one. (c) Riya’s Recipes (d) index.html - 9.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h2> or <h6>? (a) <h2> (b) <h6> (c) <h4> (d) <h5>
-
10.📄 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>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) My Hobbies (c) All about me (d) index.html -
11.🔗 Where does this link open?
<a href="contact.html">Play games</a> (a) in the same tab (b) in a new tab - 12.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
13.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="300"> - 14.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h3> or <h2>? (a) <h3> (b) <h2> (c) <h1> (d) <h6>
-
15.🔠 How many headings are in this code?
<h1>My pets</h1>
<h3>Rain today</h3>
<h4>Rain today</h4>
<p>Good morning!</p>
<h4>Hello, world!</h4> - 16.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <img> (c) <table> (d) <a>
- 17.Which of these has a closing tag? (a) <meta> (b) <input> (c) <li> (d) <hr>
-
18.🔍 One closing tag is missing. Which one?
<b>Cricket is fun.</b>
<em>Our school trip</em>
<h2>I love mangoes. (a) </em> (b) </b> (c) </h3> (d) </h2> -
19.🔗 Which words do you click on?
<a href="art.html">Contact us</a> (a) href (b) art.html (c) Visit the site (d) Contact us -
20.🔍 Which line is missing its closing tag?
line 1: <h1>Rain today
line 2: <p>I love mangoes.</p>
line 3: <b>Good morning!</b> (a) line 3 (b) line 2 (c) line 1 - 21.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) width (c) alt (d) src
-
22.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) body (b) Welcome! (c) Class 7 Blog (d) Thanks for visiting. -
23.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Papaya</li>
<li>Litchi</li>
</ul> (a) bullets (b) numbers -
24.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>Hello, world!</p>
<!-- <p>My best friend</p> -->
<p>My pets</p>
<!-- <p>The red kite</p> --> -
25.📋 Does this list show bullets or numbers?
<ol>
<li>Litchi</li>
<li>Guava</li>
<li>Papaya</li>
</ol> (a) bullets (b) numbers - 26.Which of these is an opening tag? (a) </title> (b) <li> (c) </body> (d) </h1>
- 27.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h3> or <h5>? (a) <h6> (b) <h5> (c) <h3> (d) <h1>
-
28.🔗 Which address opens when you click this link?
<a href="quiz.html">School news</a> (a) School news (b) games.html (c) about.html (d) quiz.html - 29.True or false: in <img>, width shows if the image fails. (a) True (b) False
- 30.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h3>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>
- 31.Which of these is an opening tag? (a) </h1> (b) </p> (c) </b> (d) <body>
- 32.True or false: <ul> is an unordered list. (a) False (b) True
- 33.Which of these is an opening tag? (a) </li> (b) </title> (c) </body> (d) <b>
- 34.True or false: HTML on its own cannot make a form. (a) True (b) False
-
35.🔍 One closing tag is missing. Which one?
<h3>Our school trip</h3>
<em>My best friend</em>
<b>Good morning! (a) </small> (b) </h3> (c) </b> (d) </em> - 36.Which of these has a closing tag? (a) <img> (b) <h1> (c) <input> (d) <br>
- 37.💬 Does the browser show comments on the page? (a) No (b) Yes
- 38.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
- 39.True or false: a web server stores a website’s files. (a) False (b) True
-
40.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="350">
Answer key
- a slash /
- </u>
- in a new tab
- a code editor
- 1
- Yes
- tags
- Riya’s Recipes
- <h2>
- My Hobbies
- in the same tab
- has a closing tag
- 300
- <h6>
- 4
- <meta charset="utf-8">
- <li>
- </h2>
- Contact us
- line 1
- height
- Welcome!
- bullets
- 3
- numbers
- <li>
- <h1>
- quiz.html
- False
- <h1>
- <body>
- True
- <b>
- False
- </b>
- <h1>
- No
- <h5>
- True
- 350
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids