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 is the closing tag for <small>? (a) <small/> (b) <\small> (c) <small> (d) </small>
- 3.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <head> (c) <!DOCTYPE html> (d) </head>
- 4.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <ul> (d) <br>
- 5.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h2>? (a) <h4> (b) <h2> (c) <h1> (d) <h3>
- 6.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
- 7.📄 Can HTML on its own make headings? (a) Yes (b) No
- 8.True or false: <title> goes in the head. (a) True (b) False
- 9.True or false: a web server answers page requests. (a) True (b) False
- 10.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <br> (d) <b>
-
11.🔍 One closing tag is missing. Which one?
<h2>Hello, world!</h2>
<small>My best friend</small>
<h1>Rain today (a) </small> (b) </h2> (c) </h1> (d) </u> - 12.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
- 13.📄 Can HTML on its own make links to pages? (a) Yes (b) No
-
14.🔗 Where does this link open?
<a href="https://example.com">About us</a> (a) in a new tab (b) in the same tab -
15.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Mango</li>
</ol> - 16.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) width (c) height (d) alt
-
17.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Hello, world!</p>
<!-- <p>My best friend</p> -->
<p>Cricket is fun.</p> (a) My best friend (b) Cricket is fun. (c) Hello, world! (d) Good morning! -
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="300"> (a) width (b) The full moon (c) A happy dog (d) dog.jpg -
19.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Papaya</li>
</ul> (a) numbers (b) bullets - 20.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) a comment (d) an attribute
-
21.🔗 Where does this link open?
<a href="contact.html">Visit the site</a> (a) in the same tab (b) in a new tab -
22.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Planets</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) body (b) We won by 5 runs. (c) My Hobbies (d) Planets - 23.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 24.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
- 25.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
- 26.Which of these is a closing tag? (a) <b> (b) <title> (c) </p> (d) <h1>
- 27.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
-
28.🔍 One closing tag is missing. Which one?
<p>Rain today
<h3>Our school trip</h3>
<strong>Good morning!</strong> (a) </i> (b) </strong> (c) </h3> (d) </p> - 29.True or false: in <img>, src names the picture file. (a) False (b) True
- 30.True or false: <b> is an empty tag. (a) False (b) True
- 31.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) editor (d) address
-
32.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p> -
33.🔗 Which address opens when you click this link?
<a href="games.html">Art corner</a> (a) about.html (b) contact.html (c) Art corner (d) games.html - 34.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Modern (c) Markup (d) Mouse
- 35.Which of these is an opening tag? (a) </title> (b) </li> (c) <body> (d) </p>
- 36.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a dot . (d) a slash /
-
37.🔗 Where does this link open?
<a href="art.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 38.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
- 39.Which of these goes in the head? (a) <h1> (b) <ul> (c) <link rel="stylesheet"> (d) <p>
- 40.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
Answer key
- a closing tag
- </small>
- </html>
- <ul>
- <h4>
- opens it in a new tab
- Yes
- True
- True
- <b>
- </h1>
- a web server
- Yes
- in the same tab
- 2
- height
- My best friend
- A happy dog
- bullets
- an attribute
- in the same tab
- Planets
- has a closing tag
- <h1>
- <a>
- </p>
- True
- </p>
- True
- False
- element
- 1
- games.html
- Markup
- <body>
- a slash /
- in a new tab
- in the body
- <link rel="stylesheet">
- an opening tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids