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.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="250"> (a) Our school bus (b) width (c) The full moon (d) moon.png - 2.True or false: <p> goes in the body. (a) True (b) False
-
3.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Roses are red<br>Stars shine</p> - 4.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
- 5.True or false: <b> has a closing tag. (a) True (b) False
- 6.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to load it faster (d) to describe the image
- 7.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
8.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Mango</li>
<li>Guava</li>
</ol> - 9.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 10.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
11.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="150"> - 12.💾 A web page file usually ends with which extension? (a) .txt (b) .mp3 (c) .html (d) .png
- 13.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
-
14.🔍 Which line is missing its closing tag?
line 1: <h1>My pets
line 2: <b>Rain today</b>
line 3: <i>My best friend</i> (a) line 2 (b) line 1 (c) line 3 -
15.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) index.html (b) I like to read. (c) Welcome! (d) Art Gallery - 16.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
17.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p>
<p>Fun facts</p> - 18.💬 How does an HTML comment start? (a) /* (b) <!-- (c) // (d) #
- 19.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) href (d) id
- 20.Which of these is an empty tag? (a) <p> (b) <h1> (c) <hr> (d) <ul>
- 21.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h6> or <h1>? (a) <h5> (b) <h3> (c) <h1> (d) <h6>
- 22.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h4> or <h5>? (a) <h1> (b) <h4> (c) <h3> (d) <h5>
-
23.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Grapes</li>
</ul> -
24.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Rivers flow</p> -
25.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Birds sing<br>Sky is blue<br>Kites fly high<br>Stars shine</p> - 26.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
- 27.🔍 Which is the odd one out? (a) colours code to help us (b) opens web pages for us (c) has an address bar (d) turns HTML into a page
- 28.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
-
29.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>My pets</p>
<p>Rain today</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) My pets (c) Fun facts (d) Rain today -
30.🔗 Which words do you click on?
<a href="quiz.html">Contact us</a> (a) Contact us (b) href (c) Visit the site (d) quiz.html -
31.🔗 Where does this link open?
<a href="games.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab - 32.📝 What does <br> do? (a) makes text bold (b) starts a new line (c) adds a picture (d) makes a list
- 33.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <link> (d) <img>
-
34.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) maths.html (b) Play games (c) contact.html (d) https://example.com - 35.True or false: a code editor has an address bar. (a) False (b) True
- 36.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
-
37.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Hello, world!</p>
<p>My pets</p>
<p>My best friend</p> - 38.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
39.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>My pets</p> -->
<!-- <p>Our school trip</p> --> -
40.🔗 Where does this link open?
<a href="quiz.html">Play games</a> (a) in a new tab (b) in the same tab
Answer key
- The full moon
- True
- 3
- a web browser
- True
- to describe the image
- an opening tag
- 3
- has a closing tag
- No
- 150
- .html
- <
- line 1
- Art Gallery
- Yes
- 2
- <!--
- href
- <hr>
- <h1>
- <h1>
- 2
- 2
- 5
- <h1>
- colours code to help us
- 6
- Fun facts
- Contact us
- in a new tab
- starts a new line
- <a>
- contact.html
- False
- a web browser
- 4
- an opening tag
- 1
- in the same tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids