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 text will NOT show on the page?
<p>My pets</p>
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p>
<p>Our school trip</p> (a) My pets (b) Good morning! (c) Our school trip (d) Hello, world! - 2.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
3.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers -
4.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Grapes</li>
</ol> (a) bullets (b) numbers - 5.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) height (d) src
-
6.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) href (b) https://example.com (c) Play games (d) About us - 7.Which of these is an opening tag? (a) </title> (b) </body> (c) <title> (d) </li>
- 8.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h1> or <h2>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
- 9.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) colours code to help us (d) turns HTML into a page
- 10.True or false: <ol> is one item of a list. (a) False (b) True
- 11.💬 How does an HTML comment end? (a) --> (b) >> (c) */ (d) //
- 12.🔢 In a basic web page file, which comes first: “</head>” or “</body>”? (a) </body> (b) </head>
-
13.🔍 One closing tag is missing. Which one?
<i>The red kite</i>
<h3>Fun facts</h3>
<b>Hello, world! (a) </b> (b) </h3> (c) </h1> (d) </i> -
14.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="100"> (a) fort.jpg (b) width (c) A tiger asleep (d) An old fort -
15.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>Rain today</p> -->
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p>
<!-- <p>My pets</p> --> - 16.📝 What do we need to write HTML? (a) a paintbrush (b) a microphone (c) a printer (d) a plain text editor
- 17.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h4>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
- 18.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ol> (d) <ul>
- 19.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
- 20.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 21.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
-
22.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Our school trip</p>
<p>I love mangoes.</p> - 23.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h1>? (a) <h3> (b) <h1> (c) <h4> (d) <h6>
-
24.🔗 Which words do you click on?
<a href="news.html">Art corner</a> (a) Art corner (b) href (c) news.html (d) School news -
25.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="250"> (a) Our school bus (b) bus.jpg (c) An old fort (d) width - 26.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 27.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <p> (d) <link>
- 28.True or false: in <img>, src sets how tall it is. (a) True (b) False
- 29.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) href (d) id
- 30.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 31.🔗 What does HyperText mean? (a) secret text (b) very big text (c) text with links (d) text in colour
-
32.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="150"> (a) The full moon (b) fort.jpg (c) moon.png (d) bus.jpg - 33.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 34.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) makes a list (d) starts a new line
- 35.Which of these is true of a web browser? (a) has an address bar (b) sends pages over the net (c) colours code to help us (d) saves our .html files
- 36.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h1> or <h6>? (a) <h3> (b) <h5> (c) <h6> (d) <h1>
- 37.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <p> (d) <h3>
-
38.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow</p> -
39.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="50"> (a) map.png (b) A red kite (c) cake.jpg (d) kite.png - 40.🔠 Are headings shown in bold by default? (a) Yes (b) No
Answer key
- Hello, world!
- No
- bullets
- numbers
- height
- Play games
- <title>
- <h1>
- turns HTML into a page
- False
- -->
- </head>
- </b>
- An old fort
- 2
- a plain text editor
- <h5>
- <li>
- opens it in a new tab
- an opening tag
- in the body
- 1
- <h6>
- Art corner
- Our school bus
- in the head
- <a>
- False
- href
- an opening tag
- text with links
- moon.png
- a closing tag
- starts a new line
- has an address bar
- <h6>
- <h6>
- 2
- kite.png
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids