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.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Fun facts</p>
<p>Good morning!</p> - 2.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) an attribute (d) a closing tag
-
3.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow<br>Birds sing<br>Kites fly high<br>Roses are red</p> -
4.🔗 Which address opens when you click this link?
<a href="art.html">Contact us</a> (a) Contact us (b) news.html (c) art.html (d) quiz.html - 5.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
6.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="150"> (a) A happy dog (b) dog.jpg (c) The full moon (d) width -
7.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<p>My pets</p>
<p>Good morning!</p> -
8.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>My pets</p>
<p>I love mangoes.</p> - 9.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
- 10.True or false: <h1> is an empty tag. (a) True (b) False
- 11.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
12.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="50"> (a) An old fort (b) A tiger asleep (c) fort.jpg (d) width - 13.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 14.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Machine (c) Mouse (d) Modern
- 15.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as one space (c) as a dot (d) as 5 spaces
-
16.🔗 Which words do you click on?
<a href="contact.html">Take the quiz</a> (a) href (b) Play games (c) contact.html (d) Take the quiz - 17.💬 How does an HTML comment start? (a) /* (b) <!-- (c) // (d) #
- 18.True or false: <li> is one item of a list. (a) False (b) True
- 19.📝 What does <p> make? (a) a paragraph (b) a table (c) a link (d) a picture
- 20.📄 Can HTML on its own make tables? (a) Yes (b) No
-
21.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Fun facts</p>
<p>Good morning!</p>
<p>Rain today</p> (a) Fun facts (b) Good morning! (c) I love mangoes. (d) Rain today -
22.🔗 Where does this link open?
<a href="https://example.com">Art corner</a> (a) in the same tab (b) in a new tab -
23.🔗 Which address opens when you click this link?
<a href="quiz.html">Visit the site</a> (a) games.html (b) Visit the site (c) quiz.html (d) about.html - 24.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
- 25.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 26.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
27.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Match report</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Art Gallery (b) Thanks for visiting. (c) index.html (d) Match report - 28.🔢 In a basic web page file, which comes first: “<body>” or “<html>”? (a) <html> (b) <body>
- 29.True or false: in <img>, src sets how tall it is. (a) False (b) True
- 30.📄 Can HTML on its own make a form? (a) No (b) Yes
-
31.🔠 How many headings are in this code?
<h1>My pets</h1>
<h3>The red kite</h3>
<h2>My best friend</h2>
<p>The red kite</p>
<h2>Rain today</h2> - 32.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
-
33.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Papaya</li>
</ol> - 34.🧱 HTML gives a web page its ___. (a) colours (b) sound (c) speed (d) structure
- 35.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h3> or <h6>? (a) <h1> (b) <h4> (c) <h3> (d) <h6>
- 36.Which of these is true of a web browser? (a) shows line numbers (b) colours code to help us (c) turns HTML into a page (d) sends pages over the net
- 37.📝 What do we need to write HTML? (a) a plain text editor (b) a printer (c) a paintbrush (d) a microphone
-
38.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="400"> (a) moon.png (b) width (c) The full moon (d) Our school bus -
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) cake.jpg (b) width (c) A happy dog (d) Birthday cake -
40.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="350"> (a) kite.png (b) Map of India (c) width (d) A red kite
Answer key
- 1
- an attribute
- 5
- art.html
- has a closing tag
- A happy dog
- 4
- 2
- in the body
- False
- in the head
- An old fort
- in the head
- Markup
- as one space
- Take the quiz
- <!--
- True
- a paragraph
- Yes
- I love mangoes.
- in the same tab
- quiz.html
- <ul>
- an opening tag
- Yes
- Art Gallery
- <html>
- False
- Yes
- 4
- in the body
- 2
- structure
- <h1>
- turns HTML into a page
- a plain text editor
- The full moon
- Birthday cake
- A red kite
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids