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 paragraphs show on the page?
<p>My pets</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Good morning!</p> --> - 2.🔢 In a basic web page file, which comes first: “</head>” or “</body>”? (a) </body> (b) </head>
- 3.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h3>? (a) <h3> (b) <h1> (c) <h4> (d) <h5>
- 4.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
-
5.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Papaya</li>
<li>Banana</li>
<li>Mango</li>
<li>Litchi</li>
<li>Jamun</li>
</ol> -
6.🔗 Which address opens when you click this link?
<a href="https://example.com">Contact us</a> (a) maths.html (b) Contact us (c) art.html (d) https://example.com -
7.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Rivers flow<br>Stars shine</p> - 8.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
- 9.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h2>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
- 10.True or false: in <img>, src sets how tall it is. (a) True (b) False
- 11.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
- 12.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
- 13.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
14.🔗 Where does this link open?
<a href="maths.html" target="_blank">Art corner</a> (a) in a new tab (b) in the same tab - 15.💬 How does an HTML comment start? (a) /* (b) # (c) // (d) <!--
-
16.🔗 Which words do you click on?
<a href="about.html">Contact us</a> (a) Contact us (b) Visit the site (c) about.html (d) href -
17.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>The red kite</p>
<p>Hello, world!</p> - 18.True or false: in <img>, alt shows if the image fails. (a) True (b) False
- 19.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
-
20.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h3>Cricket is fun.</h3>
<h4>My pets</h4> - 21.True or false: a code editor colours code to help us. (a) False (b) True
-
22.📋 What number does the browser show next to “Grapes”?
<ol start="2">
<li>Guava</li>
<li>Orange</li>
<li>Grapes</li>
</ol> - 23.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 24.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 10 (d) 3
- 25.📝 What does <hr> draw? (a) a link (b) a table (c) a line across the page (d) a picture
-
26.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>My pets</p> -->
<!-- <p>The red kite</p> -->
<p>My best friend</p> -
27.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p>
<p>Our school trip</p>
<p>The red kite</p> - 28.Which of these is true of a web browser? (a) answers page requests (b) stores a website’s files (c) saves our .html files (d) turns HTML into a page
-
29.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>Hello, world!</p>
<h4>Our school trip</h4> - 30.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
- 31.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h6>? (a) <h6> (b) <h5> (c) <h1> (d) <h3>
- 32.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
-
33.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>The red kite</p> -->
<p>My pets</p> (a) My pets (b) I love mangoes. (c) The red kite -
34.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="150"> (a) width (b) Birthday cake (c) Map of India (d) map.png - 35.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
- 36.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h6>? (a) <h5> (b) <h4> (c) <h6> (d) <h1>
- 37.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Markup (c) Mouse (d) Modern
- 38.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h5> or <h4>? (a) <h6> (b) <h4> (c) <h3> (d) <h5>
- 39.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
-
40.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Guava</li>
</ol> (a) bullets (b) numbers
Answer key
- 1
- </head>
- <h1>
- <ul>
- 4
- https://example.com
- 3
- a web browser
- <h1>
- False
- element
- False
- an empty tag
- in a new tab
- <!--
- Contact us
- 3
- True
- <ul>
- 3
- True
- 4
- in the head
- 1
- a line across the page
- 2
- 4
- turns HTML into a page
- 2
- <li>
- <h1>
- <!DOCTYPE html>
- The red kite
- Map of India
- in the head
- <h1>
- Markup
- <h3>
- <ul>
- numbers
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids