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 is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) Class 7 Blog (c) My drawings (d) body -
2.🔗 Which address opens when you click this link?
<a href="https://example.com">Take the quiz</a> (a) maths.html (b) https://example.com (c) art.html (d) Take the quiz - 3.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h4>? (a) <h2> (b) <h4> (c) <h1> (d) <h3>
-
4.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing<br>Sky is blue</p> - 5.True or false: <input> is an empty tag. (a) True (b) False
-
6.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red</p> -
7.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Our school trip</p>
<p>My best friend</p>
<!-- <p>I love mangoes.</p> --> (a) My best friend (b) Good morning! (c) Our school trip (d) I love mangoes. -
8.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Jamun</li>
<li>Banana</li>
</ul> (a) bullets (b) numbers - 9.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a src="about.html">
-
10.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) tiger.jpg (b) kite.png (c) map.png (d) A tiger asleep -
11.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Rain today</p>
<!-- <p>Our school trip</p> --> - 12.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
-
13.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Birds sing<br>Rivers flow</p> - 14.True or false: <p> goes in the head. (a) False (b) True
- 15.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
- 16.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h2>? (a) <h4> (b) <h2> (c) <h5> (d) <h1>
- 17.True or false: HTML on its own can pick a random number. (a) True (b) False
- 18.True or false: a web browser turns HTML into a page. (a) True (b) False
- 19.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) stores a website’s files (d) shows pages from the web
- 20.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h2> (d) <h1>
- 21.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
- 22.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) starts a new line (d) makes a list
-
23.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>My best friend</p>
<p>My pets</p>
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p> - 24.True or false: <title> goes in the head. (a) False (b) True
- 25.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as 5 spaces (c) as a dot (d) as one space
-
26.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="250"> (a) map.png (b) cake.jpg (c) A red kite (d) kite.png -
27.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Orange</li>
<li>Grapes</li>
<li>Mango</li>
<li>Papaya</li>
<li>Litchi</li>
</ol> -
28.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>The red kite</p>
<p>I love mangoes.</p> -
29.🔍 One closing tag is missing. Which one?
<u>Good morning!
<small>The red kite</small>
<h2>Cricket is fun.</h2> (a) </u> (b) </h1> (c) </h2> (d) </small> -
30.🔗 Which address opens when you click this link?
<a href="about.html">Visit the site</a> (a) https://example.com (b) contact.html (c) Visit the site (d) about.html - 31.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 32.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to describe the image (d) to make it bigger
- 33.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) on the browser tab (d) at the bottom
- 34.💬 How does an HTML comment start? (a) /* (b) # (c) // (d) <!--
- 35.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 36.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
-
37.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="100"> -
38.🔍 Which line is missing its closing tag?
line 1: <b>I love mangoes.</b>
line 2: <p>Fun facts</p>
line 3: <h1>Good morning! (a) line 1 (b) line 2 (c) line 3 - 39.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) height (c) width (d) alt
- 40.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h2> or <h3>? (a) <h2> (b) <h4> (c) <h6> (d) <h3>
Answer key
- My drawings
- https://example.com
- <h4>
- 3
- True
- 2
- I love mangoes.
- bullets
- <a href="about.html">
- tiger.jpg
- 2
- in the head
- 3
- False
- No
- <h1>
- False
- True
- stores a website’s files
- <h1>
- a web browser
- starts a new line
- 3
- True
- as one space
- kite.png
- 6
- 1
- </u>
- about.html
- No
- to describe the image
- on the browser tab
- <!--
- an empty tag
- a web browser
- 100
- line 3
- alt
- <h2>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids