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 paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Fun facts</p>
<p>I love mangoes.</p> - 2.Which of these is true of a web browser? (a) colours code to help us (b) shows line numbers (c) stores a website’s files (d) shows pages from the web
-
3.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Papaya</li>
<li>Jamun</li>
</ul> - 4.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
- 5.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a dot . (d) a slash /
- 6.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 7.Which of these is an opening tag? (a) </h1> (b) </title> (c) <body> (d) </b>
- 8.📝 What does <br> do? (a) starts a new line (b) makes a list (c) adds a picture (d) makes text bold
- 9.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
-
10.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h3>Rain today</h3>
<h3>Rain today</h3>
<h2>I love mangoes.</h2>
<h4>Rain today</h4> - 11.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) width (d) alt
-
12.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="100"> (a) map.png (b) Birthday cake (c) Map of India (d) width - 13.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <body> (c) <head> (d) </body>
- 14.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
-
15.🔗 Which words do you click on?
<a href="about.html">Visit the site</a> (a) Maths fun (b) href (c) about.html (d) Visit the site - 16.Which of these is an opening tag? (a) </li> (b) </title> (c) <h1> (d) </h1>
-
17.📋 What number does the browser show next to “Papaya”?
<ol start="8">
<li>Banana</li>
<li>Guava</li>
<li>Papaya</li>
</ol> - 18.Which of these is an opening tag? (a) <p> (b) </p> (c) </title> (d) </li>
- 19.True or false: <title> goes in the body. (a) True (b) False
-
20.🔗 Where does this link open?
<a href="contact.html">Take the quiz</a> (a) in a new tab (b) in the same tab - 21.Which of these has a closing tag? (a) <title> (b) <img> (c) <meta> (d) <hr>
- 22.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ul> (d) <ol>
-
23.🔗 Which words do you click on?
<a href="news.html">Maths fun</a> (a) news.html (b) href (c) Maths fun (d) Art corner -
24.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Roses are red<br>Stars shine<br>Rivers flow</p> - 25.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as a dot (d) as one space
-
26.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="200"> (a) width (b) An old fort (c) bus.jpg (d) Our school bus - 27.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) address (d) editor
- 28.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 29.💬 Does the browser show comments on the page? (a) Yes (b) No
- 30.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
- 31.Which of these is true of a code editor? (a) stores a website’s files (b) sends pages over the net (c) has an address bar (d) is where we type code
-
32.🔍 One closing tag is missing. Which one?
<strong>Cricket is fun.
<p>Our school trip</p>
<h2>My best friend</h2> (a) </strong> (b) </p> (c) </h3> (d) </h2> -
33.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Rain today</p>
<!-- <p>The red kite</p> -->
<p>Good morning!</p> (a) Good morning! (b) The red kite (c) Cricket is fun. (d) Rain today - 34.True or false: <ul> lists things in any order. (a) False (b) True
- 35.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
-
36.🔗 Which address opens when you click this link?
<a href="quiz.html">Art corner</a> (a) games.html (b) about.html (c) quiz.html (d) Art corner -
37.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) Visit the site (b) href (c) Contact us (d) games.html -
38.📋 What number does the browser show next to “Banana”?
<ol>
<li>Jamun</li>
<li>Banana</li>
<li>Mango</li>
</ol> - 39.Which of these is an opening tag? (a) </li> (b) </body> (c) <b> (d) </title>
- 40.📄 Can HTML on its own make a form? (a) Yes (b) No
Answer key
- 2
- shows pages from the web
- 3
- a web server
- a slash /
- a closing tag
- <body>
- starts a new line
- href
- 5
- width
- Map of India
- </html>
- <ul>
- Visit the site
- <h1>
- 10
- <p>
- False
- in the same tab
- <title>
- <ul>
- Maths fun
- 4
- as one space
- Our school bus
- element
- in the body
- No
- a web browser
- is where we type code
- </strong>
- The red kite
- True
- the body
- quiz.html
- Contact us
- 2
- <b>
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids