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.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
- 2.Which of these has a closing tag? (a) <hr> (b) <p> (c) <img> (d) <br>
- 3.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <ul> (d) <link rel="stylesheet">
- 4.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) height (c) width (d) alt
-
5.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Mango</li>
</ul> - 6.True or false: HTML on its own can show paragraphs. (a) False (b) True
- 7.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
-
8.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Our school trip</p>
<p>Fun facts</p>
<p>Good morning!</p>
<!-- <p>I love mangoes.</p> --> - 9.📝 What does <p> make? (a) a picture (b) a link (c) a paragraph (d) a table
-
10.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>My pets</p>
<h4>Hello, world!</h4> -
11.🔗 Which address opens when you click this link?
<a href="quiz.html">Art corner</a> (a) games.html (b) Art corner (c) about.html (d) quiz.html - 12.Which of these is true of a web server? (a) shows pages from the web (b) stores a website’s files (c) colours code to help us (d) has an address bar
- 13.🔍 Which is the odd one out? (a) sends pages over the net (b) shows line numbers (c) stores a website’s files (d) hosts websites online
- 14.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
15.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Rain today</p>
<p>Hello, world!</p>
<!-- <p>Good morning!</p> --> (a) Rain today (b) The red kite (c) Good morning! (d) Hello, world! - 16.Which of these is an opening tag? (a) </b> (b) </li> (c) </p> (d) <h1>
- 17.True or false: in <img>, src tells which image to load. (a) True (b) False
- 18.🔗 What does HyperText mean? (a) very big text (b) text with links (c) text in colour (d) secret text
- 19.💬 Does the browser show comments on the page? (a) Yes (b) No
-
20.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Planets</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) body (c) Class 7 Blog (d) Planets -
21.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>Our school trip</p>
<!-- <p>Rain today</p> -->
<!-- <p>Fun facts</p> --> - 22.📝 What does <hr> draw? (a) a table (b) a line across the page (c) a picture (d) a link
- 23.Which of these is an opening tag? (a) </b> (b) </li> (c) <li> (d) </p>
-
24.🔗 Which address opens when you click this link?
<a href="games.html">School news</a> (a) about.html (b) games.html (c) contact.html (d) School news - 25.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <br> (d) <ol>
-
26.🔗 Which address opens when you click this link?
<a href="art.html">Visit the site</a> (a) news.html (b) art.html (c) quiz.html (d) Visit the site -
27.🔗 Which words do you click on?
<a href="maths.html">Play games</a> (a) Play games (b) maths.html (c) href (d) About us - 28.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 29.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) < (d) {
-
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="300"> (a) Map of India (b) Birthday cake (c) width (d) map.png -
31.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Our school trip</p>
<!-- <p>My best friend</p> --> (a) My best friend (b) Our school trip (c) Fun facts -
32.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Guava</li>
<li>Mango</li>
<li>Orange</li>
</ol> -
33.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) tiger.jpg (b) A red kite (c) A tiger asleep (d) width - 34.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h6> (d) <h3>
- 35.True or false: a web server hosts websites online. (a) False (b) True
- 36.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an element name (d) an attribute
- 37.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h4> or <h2>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
- 38.True or false: <ol> is an ordered list. (a) False (b) True
- 39.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
- 40.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to colour it (d) to load it faster
Answer key
- <a href="about.html">
- <p>
- <ul>
- alt
- 2
- True
- <!--
- 3
- a paragraph
- 2
- quiz.html
- stores a website’s files
- shows line numbers
- Yes
- Good morning!
- <h1>
- True
- text with links
- No
- Planets
- 2
- a line across the page
- <li>
- games.html
- <ul>
- art.html
- Play games
- a closing tag
- <
- Map of India
- My best friend
- 6
- A tiger asleep
- <h6>
- True
- an attribute
- <h6>
- True
- in the head
- to describe the image
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids