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 the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Welcome! (b) index.html (c) Space Facts (d) Here is my best one. - 2.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <h1> (d) <br>
- 3.True or false: a code editor sends pages over the net. (a) True (b) False
-
4.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Banana</li>
</ul> (a) bullets (b) numbers - 5.True or false: a web browser has an address bar. (a) False (b) True
- 6.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h4> or <h1>? (a) <h1> (b) <h4> (c) <h5> (d) <h3>
- 7.🌐 Which one shows line numbers? (a) a code editor (b) a web browser (c) a web server
-
8.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>I love mangoes.</p>
<p>Fun facts</p>
<h2>Rain today</h2> -
9.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<p>Rain today</p>
<p>The red kite</p> - 10.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) attribute (d) editor
-
11.🔗 Which address opens when you click this link?
<a href="about.html">Contact us</a> (a) contact.html (b) https://example.com (c) about.html (d) Contact us -
12.🔗 Where does this link open?
<a href="quiz.html">Take the quiz</a> (a) in the same tab (b) in a new tab -
13.🔍 One closing tag is missing. Which one?
<h2>Our school trip</h2>
<b>Good morning!
<h1>My best friend</h1> (a) </h1> (b) </h2> (c) </b> (d) </i> - 14.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 15.🔗 What does HyperText mean? (a) very big text (b) secret text (c) text in colour (d) text with links
- 16.True or false: <ol> shows bullet points. (a) False (b) True
- 17.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
- 18.True or false: <li> is an ordered list. (a) True (b) False
- 19.Which of these is an empty tag? (a) <p> (b) <h1> (c) <ul> (d) <br>
- 20.True or false: <h1> is an empty tag. (a) False (b) True
- 21.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <a> (d) <pic>
-
22.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Our school trip</p>
<!-- <p>Cricket is fun.</p> --> -
23.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>Rain today</p>
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p> -
24.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="50"> - 25.True or false: HTML on its own can make headings. (a) False (b) True
- 26.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) src (c) height (d) width
- 27.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 28.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 29.🔍 Which is the odd one out? (a) stores a website’s files (b) sends pages over the net (c) shows line numbers (d) hosts websites online
- 30.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <p> (d) <link>
-
31.🔍 One closing tag is missing. Which one?
<b>The red kite</b>
<em>Hello, world!
<h2>Cricket is fun.</h2> (a) </small> (b) </h2> (c) </em> (d) </b> - 32.📄 Can HTML on its own count button clicks? (a) Yes (b) No
-
33.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue<br>Birds sing<br>Roses are red</p> -
34.🔍 One closing tag is missing. Which one?
<h1>Fun facts
<h3>The red kite</h3>
<small>Good morning!</small> (a) </h1> (b) </h3> (c) </b> (d) </small> -
35.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> (a) tiger.jpg (b) width (c) A tiger asleep (d) A red kite -
36.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine<br>Birds sing</p> - 37.True or false: HTML on its own cannot make headings. (a) True (b) False
-
38.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high</p> -
39.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Jamun</li>
</ol> (a) bullets (b) numbers - 40.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
Answer key
- Space Facts
- <h1>
- False
- bullets
- True
- <h1>
- a code editor
- 2
- 4
- element
- about.html
- in the same tab
- </b>
- No
- text with links
- False
- <ul>
- False
- <br>
- False
- <img>
- 1
- 3
- 50
- True
- width
- a closing tag
- an opening tag
- shows line numbers
- <a>
- </em>
- No
- 4
- </h1>
- A tiger asleep
- 3
- False
- 2
- numbers
- has a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids