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.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h3>Hello, world!</h3>
<h3>Good morning!</h3> - 2.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
-
3.🔍 Which line is missing its closing tag?
line 1: <h1>Our school trip
line 2: <small>Rain today</small>
line 3: <i>Cricket is fun.</i> (a) line 2 (b) line 1 (c) line 3 - 4.Which of these is an empty tag? (a) <h1> (b) <b> (c) <ul> (d) <img>
- 5.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
-
6.🔗 Which words do you click on?
<a href="art.html">Art corner</a> (a) art.html (b) School news (c) href (d) Art corner - 7.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h6> or <h3>? (a) <h4> (b) <h6> (c) <h3> (d) <h1>
- 8.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a src="about.html">
-
9.🔠 How many headings are in this code?
<h1>My pets</h1>
<h4>Our school trip</h4>
<h3>I love mangoes.</h3>
<p>The red kite</p>
<p>I love mangoes.</p> - 10.True or false: <input> has a closing tag. (a) False (b) True
- 11.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
- 12.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small> (c) <small/> (d) </small>
- 13.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h1> or <h6>? (a) <h4> (b) <h3> (c) <h1> (d) <h6>
-
14.🔗 Where does this link open?
<a href="maths.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 15.💬 How does an HTML comment start? (a) // (b) <!-- (c) /* (d) #
-
16.🔗 Which address opens when you click this link?
<a href="games.html">About us</a> (a) contact.html (b) About us (c) about.html (d) games.html - 17.True or false: HTML on its own can count button clicks. (a) False (b) True
-
18.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>Rain today</p> -->
<!-- <p>The red kite</p> --> - 19.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
-
20.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>My best friend</p> -->
<p>The red kite</p>
<p>Fun facts</p> (a) The red kite (b) Fun facts (c) My pets (d) My best friend - 21.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h1> (d) <h6>
-
22.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) index.html (b) All about me (c) Mars is red. (d) Cricket Club - 23.Which of these goes in the body? (a) <style> (b) <title> (c) <ul> (d) <link rel="stylesheet">
- 24.Which of these is an opening tag? (a) </p> (b) <h1> (c) </b> (d) </title>
- 25.💬 Does the browser show comments on the page? (a) Yes (b) No
-
26.🔗 Which words do you click on?
<a href="contact.html">Contact us</a> (a) contact.html (b) href (c) Contact us (d) Visit the site - 27.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
- 28.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
- 29.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
- 30.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 31.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
32.🔗 Which words do you click on?
<a href="quiz.html">About us</a> (a) Contact us (b) quiz.html (c) href (d) About us - 33.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
-
34.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Match report</h1>
<p>I like to read.</p>
</body>
</html> (a) Art Gallery (b) body (c) Match report (d) I like to read. - 35.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) height (d) alt
- 36.Which of these is an opening tag? (a) </title> (b) <p> (c) </p> (d) </b>
-
37.🔍 One closing tag is missing. Which one?
<em>Good morning!
<i>I love mangoes.</i>
<h1>My best friend</h1> (a) </p> (b) </em> (c) </i> (d) </h1> -
38.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Hello, world!</p>
<p>The red kite</p> - 39.🔢 In a basic web page file, which comes first: “</head>” or “<head>”? (a) </head> (b) <head>
-
40.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Papaya</li>
<li>Mango</li>
<li>Orange</li>
<li>Banana</li>
</ol>
Answer key
- 3
- 6
- line 1
- <img>
- Yes
- Art corner
- <h1>
- <a href="about.html">
- 3
- False
- starts a new line
- </small>
- <h1>
- in a new tab
- <!--
- games.html
- False
- 1
- to leave notes
- My best friend
- <h6>
- Cricket Club
- <ul>
- <h1>
- No
- Contact us
- a web browser
- -->
- <ol>
- has a closing tag
- an opening tag
- About us
- Yes
- Match report
- alt
- <p>
- </em>
- 3
- <head>
- 5
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids