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.🔗 Where does this link open?
<a href="maths.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab -
2.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h3>Rain today</h3>
<p>My best friend</p>
<h3>Rain today</h3> - 3.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) a comment (d) an attribute
-
4.🔗 Which address opens when you click this link?
<a href="maths.html">Contact us</a> (a) Contact us (b) news.html (c) art.html (d) maths.html -
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="250"> (a) Map of India (b) Birthday cake (c) width (d) map.png - 6.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
7.🔗 Which address opens when you click this link?
<a href="art.html">Play games</a> (a) quiz.html (b) news.html (c) Play games (d) art.html - 8.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
- 9.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 1 (d) 6
- 10.True or false: <ol> is an ordered list. (a) False (b) True
- 11.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
-
12.🔍 Which line is missing its closing tag?
line 1: <h3>The red kite</h3>
line 2: <p>Rain today
line 3: <u>Fun facts</u> (a) line 2 (b) line 1 (c) line 3 - 13.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
- 14.True or false: <meta> is an empty tag. (a) True (b) False
- 15.🏷️ Which is the closing tag for <em>? (a) <\em> (b) </em> (c) <em> (d) <em/>
-
16.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Birds sing<br>Stars shine<br>Kites fly high</p> - 17.📄 Can HTML on its own count button clicks? (a) No (b) Yes
-
18.🔗 Which words do you click on?
<a href="maths.html">Maths fun</a> (a) href (b) maths.html (c) Art corner (d) Maths fun -
19.🔗 Which words do you click on?
<a href="games.html">Play games</a> (a) href (b) About us (c) Play games (d) games.html - 20.True or false: in <img>, width sets how wide it is. (a) False (b) True
- 21.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h5> or <h3>? (a) <h6> (b) <h2> (c) <h5> (d) <h3>
-
22.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Mango</li>
<li>Guava</li>
<li>Litchi</li>
<li>Orange</li>
</ol> - 23.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 24.True or false: a code editor sends pages over the net. (a) False (b) True
- 25.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h6> or <h4>? (a) <h4> (b) <h3> (c) <h6> (d) <h5>
-
26.📄 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>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) All about me (c) Space Facts (d) index.html - 27.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 28.🔍 Which is the odd one out? (a) is where we type code (b) colours code to help us (c) stores a website’s files (d) shows line numbers
- 29.Which of these has a closing tag? (a) <img> (b) <meta> (c) <input> (d) <p>
- 30.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as one space (d) as a new line
-
31.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> -->
<p>My pets</p> - 32.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
- 33.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) alt (c) height (d) src
- 34.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
- 35.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h2>? (a) <h6> (b) <h5> (c) <h4> (d) <h2>
- 36.📝 What does <br> do? (a) makes a list (b) adds a picture (c) makes text bold (d) starts a new line
-
37.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="50"> (a) An old fort (b) Our school bus (c) width (d) bus.jpg -
38.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Easy snacks (b) Here is my best one. (c) My Hobbies (d) body - 39.📋 Which list suits a shopping list in any order? (a) <ul> (b) <hr> (c) <ol> (d) <br>
- 40.Which of these is true of a code editor? (a) stores a website’s files (b) shows pages from the web (c) hosts websites online (d) shows line numbers
Answer key
- in a new tab
- 3
- an attribute
- maths.html
- Map of India
- Yes
- art.html
- <
- 1
- True
- a slash /
- line 2
- in the body
- True
- </em>
- 4
- No
- Maths fun
- Play games
- True
- <h6>
- 5
- a closing tag
- False
- <h6>
- Space Facts
- Yes
- stores a website’s files
- <p>
- as one space
- 2
- <li>
- height
- <ol>
- <h2>
- starts a new line
- Our school bus
- Easy snacks
- <ul>
- shows line numbers
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids