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>
<p>Cricket is fun.</p>
<p>Cricket is fun.</p> - 2.True or false: a code editor shows line numbers. (a) True (b) False
- 3.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h4>
- 4.Which of these has a closing tag? (a) <ul> (b) <br> (c) <meta> (d) <hr>
-
5.🔍 One closing tag is missing. Which one?
<h1>Good morning!
<h3>The red kite</h3>
<h2>My pets</h2> (a) </h3> (b) </h2> (c) </small> (d) </h1> - 6.True or false: a code editor hosts websites online. (a) False (b) True
- 7.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 8.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <head> (d) <!DOCTYPE html>
-
9.🔍 One closing tag is missing. Which one?
<h1>My best friend</h1>
<h2>Our school trip</h2>
<b>Cricket is fun. (a) </i> (b) </h1> (c) </h2> (d) </b> - 10.True or false: in <img>, width names the picture file. (a) True (b) False
- 11.🔗 What does HyperText mean? (a) text with links (b) secret text (c) very big text (d) text in colour
-
12.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="150"> (a) kite.png (b) A red kite (c) width (d) Map of India - 13.True or false: <ul> is one item of a list. (a) False (b) True
- 14.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 15.📝 What do we need to write HTML? (a) a plain text editor (b) a microphone (c) a paintbrush (d) a printer
- 16.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h6>? (a) <h5> (b) <h4> (c) <h6> (d) <h2>
- 17.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h4> or <h6>? (a) <h4> (b) <h6> (c) <h2> (d) <h1>
- 18.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
-
19.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Mango</li>
</ol> - 20.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h4> or <h3>? (a) <h3> (b) <h4> (c) <h5> (d) <h6>
- 21.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h4>? (a) <h4> (b) <h5> (c) <h6> (d) <h3>
-
22.🔗 Which address opens when you click this link?
<a href="about.html">School news</a> (a) School news (b) contact.html (c) https://example.com (d) about.html - 23.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
- 24.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
- 25.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
- 26.True or false: in <img>, alt is read by screen readers. (a) True (b) False
- 27.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 28.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) address (d) attribute
-
29.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Good morning!</p>
<p>Hello, world!</p>
<p>I love mangoes.</p> (a) Hello, world! (b) I love mangoes. (c) The red kite (d) Good morning! -
30.🔗 Which words do you click on?
<a href="about.html">Take the quiz</a> (a) href (b) Take the quiz (c) about.html (d) Play games - 31.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) [ (d) (
- 32.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
- 33.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h4>? (a) <h5> (b) <h2> (c) <h6> (d) <h4>
-
34.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="200"> (a) moon.png (b) A happy dog (c) bus.jpg (d) dog.jpg -
35.🔗 Where does this link open?
<a href="news.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 36.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h4> or <h5>? (a) <h1> (b) <h4> (c) <h5> (d) <h6>
- 37.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
-
38.🔍 One closing tag is missing. Which one?
<i>I love mangoes.
<strong>Rain today</strong>
<em>Cricket is fun.</em> (a) </strong> (b) </em> (c) </i> (d) </u> - 39.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <ol> (c) <li>
-
40.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Match report</h1>
<p>Mars is red.</p>
</body>
</html> (a) Cricket Club (b) body (c) Mars is red. (d) Match report
Answer key
- 1
- True
- <h5>
- <ul>
- </h1>
- False
- an empty tag
- <!DOCTYPE html>
- </b>
- False
- text with links
- A red kite
- False
- an opening tag
- a plain text editor
- <h6>
- <h6>
- <li>
- 2
- <h6>
- <h3>
- about.html
- href
- in the body
- -->
- True
- Yes
- element
- The red kite
- Take the quiz
- <
- <!DOCTYPE html>
- <h2>
- dog.jpg
- in a new tab
- <h6>
- <a>
- </i>
- <li>
- Match report
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids