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 code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <a src="about.html"> (d) <link about.html>
-
2.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="100"> (a) moon.png (b) The full moon (c) width (d) Our school bus - 3.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 4.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h2> or <h1>? (a) <h1> (b) <h2> (c) <h6> (d) <h4>
- 5.📝 What does <p> make? (a) a table (b) a paragraph (c) a link (d) a picture
- 6.Which of these is a closing tag? (a) <p> (b) </p> (c) <b> (d) <title>
- 7.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) alt (d) height
- 8.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
- 9.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
10.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>My pets</p> -->
<p>Our school trip</p>
<!-- <p>Hello, world!</p> --> -
11.🔍 Which line is missing its closing tag?
line 1: <h1>Fun facts</h1>
line 2: <p>Our school trip
line 3: <b>My pets</b> (a) line 3 (b) line 2 (c) line 1 - 12.📄 Can HTML on its own count button clicks? (a) No (b) Yes
-
13.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="50"> - 14.True or false: in <img>, src sets how wide it is. (a) False (b) True
- 15.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h5> or <h1>? (a) <h6> (b) <h1> (c) <h5> (d) <h3>
- 16.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
17.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="350"> (a) kite.png (b) A red kite (c) map.png (d) cake.jpg - 18.True or false: <ol> is an unordered list. (a) True (b) False
- 19.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
- 20.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 21.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
- 22.True or false: in <img>, src sets how tall it is. (a) False (b) True
- 23.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 24.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
25.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>Hello, world!</p>
<!-- <p>The red kite</p> -->
<!-- <p>Cricket is fun.</p> --> -
26.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Hello, world!</h2>
<p>The red kite</p> -
27.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue<br>Roses are red</p> - 28.True or false: HTML on its own can add up two numbers. (a) True (b) False
- 29.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h3>? (a) <h6> (b) <h2> (c) <h1> (d) <h3>
-
30.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Guava</li>
<li>Mango</li>
<li>Grapes</li>
<li>Orange</li>
</ul> -
31.🔗 Which address opens when you click this link?
<a href="contact.html">School news</a> (a) School news (b) maths.html (c) contact.html (d) https://example.com -
32.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>My best friend</p>
<p>My pets</p>
<h2>Our school trip</h2> -
33.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<!-- <p>My pets</p> -->
<p>Our school trip</p> (a) Cricket is fun. (b) My pets (c) I love mangoes. (d) Our school trip - 34.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <style> (d) <ul>
-
35.🔍 One closing tag is missing. Which one?
<em>Rain today</em>
<p>The red kite</p>
<small>Cricket is fun. (a) </em> (b) </p> (c) </small> (d) </strong> -
36.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Banana</li>
<li>Grapes</li>
</ol> (a) bullets (b) numbers - 37.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
- 38.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h3> or <h5>? (a) <h5> (b) <h6> (c) <h3> (d) <h4>
- 39.🏷️ Which is the closing tag for <small>? (a) <small/> (b) <\small> (c) </small> (d) <small>
- 40.📋 Which list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>
Answer key
- <a href="about.html">
- The full moon
- an opening tag
- <h6>
- a paragraph
- </p>
- width
- 6
- No
- 2
- line 2
- No
- 50
- False
- <h1>
- an opening tag
- kite.png
- False
- a web browser
- an empty tag
- <ul>
- False
- Yes
- a closing tag
- 2
- 2
- 3
- False
- <h1>
- 5
- contact.html
- 3
- My pets
- <ul>
- </small>
- numbers
- <ul>
- <h3>
- </small>
- <li>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids