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 <p> make? (a) a picture (b) a table (c) a paragraph (d) a link
-
2.🔗 Which address opens when you click this link?
<a href="https://example.com">Play games</a> (a) https://example.com (b) art.html (c) Play games (d) maths.html -
3.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) All about me (b) index.html (c) Space Facts (d) We won by 5 runs. - 4.🔗 What does HyperText mean? (a) text with links (b) very big text (c) text in colour (d) secret text
- 5.Which of these is an opening tag? (a) </li> (b) </p> (c) </b> (d) <h1>
-
6.🔍 One closing tag is missing. Which one?
<h1>I love mangoes.
<p>Cricket is fun.</p>
<h2>My pets</h2> (a) </h2> (b) </p> (c) </h1> (d) </em> - 7.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h5>
- 8.True or false: a code editor shows line numbers. (a) False (b) True
- 9.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 10.True or false: <meta> has a closing tag. (a) True (b) False
-
11.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red</p> - 12.Which of these is true of a code editor? (a) turns HTML into a page (b) colours code to help us (c) sends pages over the net (d) opens web pages for us
-
13.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="350"> (a) Our school bus (b) tiger.jpg (c) fort.jpg (d) bus.jpg -
14.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>My best friend</p> -->
<p>My pets</p>
<p>Our school trip</p> - 15.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //
-
16.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>Fun facts</h2>
<h3>Our school trip</h3> - 17.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
18.🔗 Where does this link open?
<a href="contact.html">Art corner</a> (a) in the same tab (b) in a new tab - 19.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
20.🔗 Where does this link open?
<a href="maths.html">Play games</a> (a) in the same tab (b) in a new tab - 21.Which of these has a closing tag? (a) <meta> (b) <img> (c) <p> (d) <hr>
- 22.True or false: <ol> goes inside ul or ol. (a) False (b) True
- 23.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h6>? (a) <h3> (b) <h4> (c) <h6> (d) <h2>
-
24.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>Fun facts</p>
<!-- <p>Hello, world!</p> --> - 25.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
- 26.True or false: HTML on its own can pick a random number. (a) False (b) True
- 27.Which of these is an opening tag? (a) </p> (b) <b> (c) </title> (d) </li>
-
28.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>The red kite</p>
<p>Fun facts</p>
<!-- <p>I love mangoes.</p> --> (a) I love mangoes. (b) The red kite (c) My best friend (d) Fun facts -
29.🔍 One closing tag is missing. Which one?
<small>The red kite
<u>Rain today</u>
<i>Cricket is fun.</i> (a) </u> (b) </small> (c) </em> (d) </i> - 30.📄 Can HTML on its own make a form? (a) Yes (b) No
- 31.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as a new line (d) as 5 spaces
-
32.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Papaya</li>
<li>Grapes</li>
<li>Banana</li>
<li>Jamun</li>
<li>Guava</li>
</ol> - 33.🌐 Which one sends pages over the net? (a) a web server (b) a web browser (c) a code editor
- 34.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to describe the image (d) to make it bigger
- 35.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a src="about.html"> (d) <a alt="about.html">
- 36.Which of these goes in the head? (a) <ul> (b) <p> (c) <link rel="stylesheet"> (d) <h1>
- 37.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
-
38.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p>
<p>Our school trip</p> (a) I love mangoes. (b) Hello, world! (c) Our school trip (d) Cricket is fun. -
39.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p>
<p>Cricket is fun.</p> -
40.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>The red kite</p>
<h2>Hello, world!</h2>
<h3>Good morning!</h3>
Answer key
- a paragraph
- https://example.com
- Space Facts
- text with links
- <h1>
- </h1>
- <h1>
- True
- an opening tag
- False
- 2
- colours code to help us
- bus.jpg
- 3
- <!--
- 3
- a closing tag
- in the same tab
- an empty tag
- in the same tab
- <p>
- False
- <h6>
- 2
- a web browser
- False
- <b>
- I love mangoes.
- </small>
- Yes
- as one space
- 6
- a web server
- to describe the image
- <a href="about.html">
- <link rel="stylesheet">
- on the browser tab
- Cricket is fun.
- 2
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids