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 of these is an opening tag? (a) </b> (b) </h1> (c) </body> (d) <p>
-
2.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="150"> (a) bus.jpg (b) fort.jpg (c) The full moon (d) moon.png -
3.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Orange</li>
<li>Jamun</li>
<li>Banana</li>
</ul> -
4.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="50"> (a) Map of India (b) width (c) kite.png (d) A red kite - 5.Which of these is true of a code editor? (a) hosts websites online (b) sends pages over the net (c) stores a website’s files (d) colours code to help us
- 6.True or false: <li> is an empty tag. (a) False (b) True
- 7.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
- 8.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 9.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h6>? (a) <h2> (b) <h5> (c) <h6> (d) <h3>
- 10.True or false: a code editor stores a website’s files. (a) True (b) False
- 11.True or false: in <img>, alt sets how wide it is. (a) False (b) True
- 12.💬 How does an HTML comment end? (a) --> (b) // (c) */ (d) >>
- 13.📄 Can HTML on its own count button clicks? (a) No (b) Yes
- 14.True or false: HTML on its own can make a form. (a) False (b) True
-
15.🔗 Which words do you click on?
<a href="about.html">Take the quiz</a> (a) Play games (b) about.html (c) Take the quiz (d) href -
16.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>The red kite</p>
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> --> - 17.🌐 Which one shows pages from the web? (a) a web browser (b) a code editor (c) a web server
-
18.📋 What number does the browser show next to “Jamun”?
<ol start="6">
<li>Grapes</li>
<li>Orange</li>
<li>Jamun</li>
<li>Mango</li>
</ol> - 19.📄 Can HTML on its own pick a random number? (a) No (b) Yes
- 20.📝 What does <hr> draw? (a) a table (b) a link (c) a picture (d) a line across the page
-
21.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<p>Our school trip</p> (a) Hello, world! (b) Cricket is fun. (c) Our school trip - 22.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h2>? (a) <h5> (b) <h4> (c) <h2> (d) <h3>
- 23.True or false: a code editor answers page requests. (a) True (b) False
- 24.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h4>? (a) <h4> (b) <h5> (c) <h6> (d) <h3>
- 25.True or false: a web browser has an address bar. (a) False (b) True
-
26.🔍 Which line is missing its closing tag?
line 1: <small>My best friend</small>
line 2: <p>Hello, world!</p>
line 3: <b>Rain today (a) line 1 (b) line 2 (c) line 3 -
27.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue<br>Birds sing<br>Roses are red<br>Stars shine</p> - 28.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
-
29.🔗 Where does this link open?
<a href="art.html">Play games</a> (a) in a new tab (b) in the same tab - 30.True or false: a web server turns HTML into a page. (a) True (b) False
- 31.🔤 In “HTML”, what does the L stand for? (a) Language (b) Laptop (c) Line (d) Link
- 32.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h1>? (a) <h3> (b) <h1> (c) <h4> (d) <h5>
- 33.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h6>? (a) <h6> (b) <h5> (c) <h4> (d) <h3>
-
34.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>I love mangoes.</p>
<p>Cricket is fun.</p> - 35.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it bold (d) makes it blank
-
36.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing<br>Sky is blue<br>Rivers flow<br>Stars shine</p> - 37.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) height (c) alt (d) src
-
38.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Banana</li>
</ul> (a) bullets (b) numbers -
39.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>Hello, world!</p>
<p>Good morning!</p>
<p>My pets</p> (a) Hello, world! (b) Fun facts (c) My pets (d) Good morning! - 40.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h6>? (a) <h5> (b) <h4> (c) <h6> (d) <h1>
Answer key
- <p>
- moon.png
- 4
- A red kite
- colours code to help us
- False
- to leave notes
- has a closing tag
- <h2>
- False
- False
- -->
- No
- True
- Take the quiz
- 3
- a web browser
- 8
- No
- a line across the page
- Hello, world!
- <h2>
- False
- <h3>
- True
- line 3
- 5
- <ol>
- in the same tab
- False
- Language
- <h5>
- <h3>
- 3
- opens it in a new tab
- 5
- height
- bullets
- Fun facts
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids