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.💬 Does the browser show comments on the page? (a) No (b) Yes
- 2.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 3.True or false: <ol> lists things in any order. (a) True (b) False
- 4.True or false: HTML on its own can keep a high score. (a) False (b) True
-
5.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab -
6.🔗 Where does this link open?
<a href="maths.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab -
7.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>Good morning!</h2>
<p>I love mangoes.</p> -
8.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) Play games (b) contact.html (c) https://example.com (d) maths.html - 9.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h3> (d) <h1>
-
10.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Orange</li>
</ul> - 11.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) height (d) alt
- 12.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) height (d) width
- 13.True or false: <li> is an ordered list. (a) False (b) True
- 14.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
- 15.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 16.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an element name (d) an attribute
- 17.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
- 18.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
- 19.True or false: in <img>, width sets how wide it is. (a) True (b) False
- 20.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <img> (d) <p>
- 21.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
- 22.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //
-
23.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>The red kite</p>
<p>Our school trip</p>
<p>My pets</p> -
24.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="150"> - 25.🏷️ Which is the closing tag for <em>? (a) </em> (b) <em> (c) <\em> (d) <em/>
- 26.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
-
27.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="50"> (a) map.png (b) cake.jpg (c) A red kite (d) kite.png - 28.🌍 Which program shows a web page to us? (a) a music player (b) a paint program (c) a calculator (d) a web browser
- 29.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
- 30.True or false: <title> is an empty tag. (a) False (b) True
- 31.True or false: in <img>, alt is read by screen readers. (a) False (b) True
- 32.🏷️ Which is the closing tag for <small>? (a) </small> (b) <\small> (c) <small> (d) <small/>
- 33.🔍 Which is the odd one out? (a) hosts websites online (b) stores a website’s files (c) answers page requests (d) shows pages from the web
-
34.🔍 One closing tag is missing. Which one?
<b>My pets
<i>Hello, world!</i>
<h1>Our school trip</h1> (a) </h1> (b) </small> (c) </i> (d) </b> -
35.🔗 Which address opens when you click this link?
<a href="about.html">About us</a> (a) About us (b) https://example.com (c) contact.html (d) about.html -
36.🔗 Which address opens when you click this link?
<a href="quiz.html">Contact us</a> (a) Contact us (b) games.html (c) about.html (d) quiz.html - 37.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h6>? (a) <h1> (b) <h3> (c) <h6> (d) <h2>
- 38.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
- 39.Which of these is a closing tag? (a) <b> (b) <li> (c) </title> (d) <h1>
- 40.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
Answer key
- No
- Yes
- False
- False
- in a new tab
- in a new tab
- 2
- contact.html
- <h6>
- 2
- alt
- height
- False
- to describe the image
- an opening tag
- an attribute
- on the browser tab
- opens it in a new tab
- True
- <img>
- a web browser
- <!--
- 3
- 150
- </em>
- <a href="about.html">
- kite.png
- a web browser
- in the body
- False
- True
- </small>
- shows pages from the web
- </b>
- about.html
- quiz.html
- <h6>
- Yes
- </title>
- an empty tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids