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 goes in the body? (a) <meta charset="utf-8"> (b) <ul> (c) <title> (d) <link rel="stylesheet">
- 2.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h6> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h6>
- 3.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 4.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h4> or <h6>? (a) <h5> (b) <h3> (c) <h4> (d) <h6>
-
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> (a) A tiger asleep (b) A red kite (c) tiger.jpg (d) width - 6.🧱 HTML gives a web page its ___. (a) sound (b) structure (c) colours (d) speed
- 7.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
8.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>My best friend</p>
<h2>Hello, world!</h2>
<p>Rain today</p>
<h2>Good morning!</h2>
<p>Our school trip</p> - 9.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
-
10.🔗 Which address opens when you click this link?
<a href="art.html">Visit the site</a> (a) news.html (b) art.html (c) Visit the site (d) quiz.html -
11.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="400"> (a) moon.png (b) Our school bus (c) width (d) The full moon -
12.🔍 Which line is missing its closing tag?
line 1: <h3>Our school trip
line 2: <h1>Hello, world!</h1>
line 3: <strong>Good morning!</strong> (a) line 1 (b) line 3 (c) line 2 - 13.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) address (d) element
- 14.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h3> or <h1>? (a) <h1> (b) <h4> (c) <h6> (d) <h3>
- 15.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </body> (c) </head> (d) <head>
- 16.True or false: a web server stores a website’s files. (a) False (b) True
- 17.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 18.📄 Can HTML on its own make tables? (a) No (b) Yes
-
19.📋 What number does the browser show next to “Banana”?
<ol>
<li>Guava</li>
<li>Banana</li>
<li>Jamun</li>
</ol> - 20.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
-
21.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>My best friend</p>
<!-- <p>The red kite</p> --> -
22.🔗 Where does this link open?
<a href="contact.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab -
23.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Fun facts</p> --> - 24.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
- 25.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 6 (d) 3
- 26.True or false: in <img>, src tells which image to load. (a) False (b) True
-
27.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>Hello, world!</h2>
<p>Hello, world!</p>
<p>My best friend</p>
<p>My best friend</p> - 28.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
-
29.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>The red kite</p>
<p>The red kite</p>
<p>Good morning!</p>
<h3>My pets</h3> -
30.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Mango</li>
</ol> (a) numbers (b) bullets - 31.True or false: <li> lists steps in order. (a) False (b) True
- 32.True or false: in <img>, src is read by screen readers. (a) True (b) False
- 33.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 34.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
- 35.Which of these goes in the head? (a) <a> (b) <style> (c) <img> (d) <table>
-
36.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p>
<p>The red kite</p>
<!-- <p>Hello, world!</p> --> - 37.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <img> (d) <link>
-
38.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Fun facts</p>
<p>Cricket is fun.</p> - 39.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as a new line (d) as 5 spaces
- 40.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) on the browser tab (d) in a big heading
Answer key
- <ul>
- <h6>
- Yes
- <h3>
- A tiger asleep
- structure
- has a closing tag
- 4
- an attribute
- art.html
- The full moon
- line 1
- element
- <h1>
- <!DOCTYPE html>
- True
- Yes
- Yes
- 2
- in the body
- 1
- in a new tab
- 1
- <h6>
- 6
- True
- 4
- <h1>
- 2
- numbers
- False
- False
- an empty tag
- href
- <style>
- 3
- <a>
- 1
- as one space
- on the browser tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids