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 is the closing tag for <h1>? (a) <\h1> (b) </h1> (c) <h1/> (d) <h1>
-
2.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Banana</li>
</ul> (a) numbers (b) bullets - 3.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 4.True or false: in <img>, src tells which image to load. (a) True (b) False
-
5.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow</p> - 6.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a alt="about.html">
- 7.True or false: in <img>, height shows if the image fails. (a) True (b) False
- 8.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
-
9.🔗 Which address opens when you click this link?
<a href="news.html">Contact us</a> (a) quiz.html (b) news.html (c) Contact us (d) games.html -
10.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Litchi</li>
</ul> (a) bullets (b) numbers -
11.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Cricket is fun.</p>
<p>The red kite</p>
<p>Hello, world!</p> (a) Cricket is fun. (b) The red kite (c) Hello, world! (d) My best friend -
12.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Papaya</li>
<li>Orange</li>
</ul> - 13.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
14.🔗 Which address opens when you click this link?
<a href="about.html">Art corner</a> (a) about.html (b) contact.html (c) https://example.com (d) Art corner -
15.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="150"> -
16.🔗 Where does this link open?
<a href="contact.html" target="_blank">School news</a> (a) in a new tab (b) in the same tab -
17.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Litchi</li>
<li>Guava</li>
<li>Jamun</li>
<li>Orange</li>
</ul> - 18.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
-
19.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> --> -
20.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p>
<p>Good morning!</p> (a) Good morning! (b) I love mangoes. (c) Fun facts - 21.🔗 Which attribute holds the address of a link? (a) href (b) id (c) alt (d) src
-
22.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h4>Our school trip</h4>
<p>My best friend</p>
<p>My pets</p>
<h4>Fun facts</h4> -
23.🔗 Where does this link open?
<a href="news.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab -
24.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>I love mangoes.</h2>
<h3>The red kite</h3>
<p>Good morning!</p>
<p>Hello, world!</p> -
25.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<p>My best friend</p> (a) My best friend (b) Good morning! (c) I love mangoes. (d) Cricket is fun. - 26.True or false: in <img>, height is read by screen readers. (a) False (b) True
- 27.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
- 28.True or false: a code editor shows pages from the web. (a) False (b) True
- 29.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
- 30.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) < (d) [
- 31.True or false: HTML on its own can pick a random number. (a) False (b) True
- 32.🔗 What does HyperText mean? (a) text with links (b) secret text (c) text in colour (d) very big text
- 33.True or false: <img> has a closing tag. (a) True (b) False
- 34.🔍 Which is the odd one out? (a) shows line numbers (b) opens web pages for us (c) turns HTML into a page (d) has an address bar
-
35.🔗 Where does this link open?
<a href="contact.html">School news</a> (a) in the same tab (b) in a new tab - 36.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
- 37.True or false: a web server sends pages over the net. (a) False (b) True
- 38.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .txt (d) .html
- 39.True or false: a code editor shows line numbers. (a) False (b) True
- 40.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </body> (c) <head> (d) </head>
Answer key
- </h1>
- bullets
- an empty tag
- True
- 2
- <a href="about.html">
- False
- <a>
- news.html
- bullets
- My best friend
- 3
- Yes
- about.html
- 150
- in a new tab
- 5
- in the body
- 2
- Fun facts
- href
- 3
- in a new tab
- 3
- Good morning!
- False
- in the body
- False
- in the body
- <
- False
- text with links
- False
- shows line numbers
- in the same tab
- 6
- True
- .html
- True
- <!DOCTYPE html>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids