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 items does this list show?
<ul>
<li>Guava</li>
<li>Mango</li>
<li>Orange</li>
<li>Banana</li>
<li>Jamun</li>
</ul> - 2.Which of these is an empty tag? (a) <ul> (b) <h1> (c) <p> (d) <input>
- 3.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
-
4.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="100"> (a) fort.jpg (b) moon.png (c) bus.jpg (d) The full moon -
5.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine</p> -
6.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>My pets</p> -->
<p>The red kite</p>
<p>Cricket is fun.</p> (a) Good morning! (b) The red kite (c) My pets (d) Cricket is fun. -
7.🔗 Where does this link open?
<a href="about.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 8.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h6>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
- 9.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <\h2> (c) </h2> (d) <h2/>
-
10.🔍 One closing tag is missing. Which one?
<h3>My best friend</h3>
<h2>I love mangoes.</h2>
<h1>Good morning! (a) </h2> (b) </p> (c) </h1> (d) </h3> - 11.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) on the browser tab (d) in a big heading
- 12.🖼️ Which attribute of <img> tells which image to load? (a) height (b) src (c) alt (d) width
- 13.Which of these is an empty tag? (a) <hr> (b) <h1> (c) <ul> (d) <title>
- 14.Which of these is a closing tag? (a) <body> (b) <h1> (c) </h1> (d) <p>
- 15.Which of these is true of a web browser? (a) saves our .html files (b) is where we type code (c) stores a website’s files (d) turns HTML into a page
- 16.🔍 Which is the odd one out? (a) shows pages from the web (b) colours code to help us (c) turns HTML into a page (d) has an address bar
- 17.📛 In <a href="x.html">, what is href? (a) a comment (b) an attribute (c) a closing tag (d) an element name
-
18.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) Welcome! (b) Try this poha. (c) body (d) Art Gallery - 19.True or false: a web browser opens web pages for us. (a) True (b) False
- 20.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h6> (d) <h1>
-
21.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>Good morning!</p>
<p>The red kite</p>
<!-- <p>I love mangoes.</p> --> (a) Good morning! (b) Hello, world! (c) The red kite (d) I love mangoes. - 22.🧱 HTML gives a web page its ___. (a) structure (b) speed (c) sound (d) colours
-
23.🔗 Which address opens when you click this link?
<a href="quiz.html">Contact us</a> (a) about.html (b) quiz.html (c) Contact us (d) games.html - 24.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h3> or <h6>? (a) <h4> (b) <h6> (c) <h5> (d) <h3>
- 25.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 26.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <pic> (d) <img>
- 27.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
-
28.🔍 One closing tag is missing. Which one?
<u>Our school trip
<b>Good morning!</b>
<strong>Fun facts</strong> (a) </u> (b) </strong> (c) </b> (d) </i> - 29.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
- 30.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as 5 spaces (d) as a new line
- 31.True or false: <img> has a closing tag. (a) True (b) False
- 32.Which of these is a closing tag? (a) <p> (b) </li> (c) <li> (d) <title>
-
33.🔗 Where does this link open?
<a href="about.html">Play games</a> (a) in the same tab (b) in a new tab - 34.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h1> or <h2>? (a) <h1> (b) <h5> (c) <h2> (d) <h6>
-
35.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p> (a) I love mangoes. (b) The red kite (c) Fun facts - 36.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h3> or <h5>? (a) <h1> (b) <h4> (c) <h5> (d) <h3>
- 37.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 38.True or false: a code editor colours code to help us. (a) True (b) False
-
39.🔗 Which address opens when you click this link?
<a href="news.html">School news</a> (a) quiz.html (b) games.html (c) School news (d) news.html - 40.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a dot . (d) a hash #
Answer key
- 5
- <input>
- in the head
- moon.png
- 2
- My pets
- in a new tab
- <h6>
- </h2>
- </h1>
- on the browser tab
- src
- <hr>
- </h1>
- turns HTML into a page
- colours code to help us
- an attribute
- Welcome!
- True
- <h1>
- I love mangoes.
- structure
- quiz.html
- <h6>
- has a closing tag
- <img>
- a web browser
- </u>
- <a>
- as one space
- False
- </li>
- in the same tab
- <h1>
- The red kite
- <h1>
- a closing tag
- True
- news.html
- a slash /
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids