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.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <head> (c) </head> (d) </body>
-
2.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>I love mangoes.</p>
<p>Fun facts</p>
<p>Hello, world!</p> - 3.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
-
4.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Cricket is fun.</p>
<p>My best friend</p>
<!-- <p>The red kite</p> --> (a) Cricket is fun. (b) The red kite (c) My best friend (d) My pets - 5.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <a src="about.html"> (d) <link about.html>
- 6.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 7.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 8.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) width (d) alt
- 9.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
-
10.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Fun facts</p>
<h4>Hello, world!</h4> - 11.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Machine (c) Markup (d) Mouse
-
12.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<p>Cricket is fun.</p> - 13.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
- 14.Which of these is an empty tag? (a) <li> (b) <img> (c) <ul> (d) <p>
- 15.True or false: <ul> shows bullet points. (a) False (b) True
-
16.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Fun facts</p>
<p>The red kite</p>
<p>My pets</p> -
17.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h2>Fun facts</h2>
<p>Fun facts</p>
<p>I love mangoes.</p>
<h3>Our school trip</h3> -
18.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p>
<!-- <p>My best friend</p> -->
<!-- <p>Fun facts</p> --> - 19.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h6> or <h1>? (a) <h2> (b) <h6> (c) <h4> (d) <h1>
- 20.🔢 In a basic web page file, which comes first: “<html>” or “</head>”? (a) <html> (b) </head>
- 21.True or false: <a> goes in the head. (a) True (b) False
- 22.Which of these has a closing tag? (a) <img> (b) <meta> (c) <hr> (d) <p>
-
23.🔗 Which address opens when you click this link?
<a href="maths.html">Contact us</a> (a) news.html (b) maths.html (c) art.html (d) Contact us - 24.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ul> (d) <ol>
- 25.📄 Can HTML on its own make tables? (a) No (b) Yes
-
26.📋 What number does the browser show next to “Papaya”?
<ol start="8">
<li>Banana</li>
<li>Papaya</li>
<li>Mango</li>
</ol> - 27.🔢 In a basic web page file, which comes first: “</body>” or “<head>”? (a) </body> (b) <head>
- 28.True or false: HTML on its own cannot make links to pages. (a) False (b) True
- 29.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h5>? (a) <h1> (b) <h6> (c) <h2> (d) <h5>
- 30.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
-
31.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Fun facts</p>
<p>Good morning!</p> - 32.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 33.Which of these has a closing tag? (a) <input> (b) <meta> (c) <hr> (d) <h1>
-
34.🔍 One closing tag is missing. Which one?
<h2>Cricket is fun.</h2>
<strong>Rain today
<h3>Our school trip</h3> (a) </h2> (b) </h3> (c) </p> (d) </strong> -
35.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) body (b) I like to read. (c) Class 7 Blog (d) Easy snacks - 36.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small> (d) <small/>
- 37.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) { (d) (
- 38.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
-
39.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Mango</li>
<li>Guava</li>
<li>Grapes</li>
</ul> - 40.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h2> or <h6>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>
Answer key
- </html>
- 1
- <img>
- The red kite
- <a href="about.html">
- a closing tag
- an empty tag
- alt
- a slash /
- 2
- Markup
- 2
- <a>
- <img>
- True
- 1
- 3
- 1
- <h6>
- <html>
- False
- <p>
- maths.html
- <ul>
- Yes
- 9
- <head>
- False
- <h1>
- True
- 1
- True
- <h1>
- </strong>
- Easy snacks
- </small>
- <
- Yes
- 4
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids