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 headings are in this code?
<h1>My pets</h1>
<h4>I love mangoes.</h4>
<h3>My pets</h3>
<h2>Hello, world!</h2>
<p>I love mangoes.</p> -
2.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Hello, world!</p> - 3.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
- 4.📄 Can HTML on its own count button clicks? (a) No (b) Yes
- 5.💬 How does an HTML comment start? (a) // (b) /* (c) <!-- (d) #
- 6.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <p> (d) <ol>
- 7.📄 Can HTML on its own make headings? (a) Yes (b) No
- 8.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h2> or <h1>? (a) <h6> (b) <h5> (c) <h2> (d) <h1>
- 9.True or false: <img> has a closing tag. (a) False (b) True
-
10.🔗 Where does this link open?
<a href="https://example.com" target="_blank">School news</a> (a) in a new tab (b) in the same tab -
11.🔍 One closing tag is missing. Which one?
<strong>Hello, world!</strong>
<small>My best friend</small>
<h1>Good morning! (a) </small> (b) </i> (c) </strong> (d) </h1> - 12.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
- 13.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Mouse (d) Machine
- 14.True or false: a web browser shows line numbers. (a) False (b) True
- 15.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 16.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 17.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) width (c) alt (d) src
- 18.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
- 19.🏷️ Which is the closing tag for <i>? (a) <i> (b) </i> (c) <i/> (d) <\i>
- 20.True or false: <hr> has a closing tag. (a) False (b) True
- 21.True or false: a web browser sends pages over the net. (a) False (b) True
- 22.True or false: <ol> lists steps in order. (a) True (b) False
- 23.📄 Can HTML on its own pick a random number? (a) Yes (b) No
- 24.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
- 25.True or false: <meta> is an empty tag. (a) True (b) False
-
26.📋 What number does the browser show next to “Grapes”?
<ol start="7">
<li>Litchi</li>
<li>Banana</li>
<li>Jamun</li>
<li>Mango</li>
<li>Grapes</li>
<li>Guava</li>
</ol> -
27.🔍 One closing tag is missing. Which one?
<h1>Fun facts</h1>
<h2>I love mangoes.</h2>
<h3>Hello, world! (a) </h1> (b) </h3> (c) </strong> (d) </h2> - 28.🏷️ Which is the closing tag for <u>? (a) <u> (b) <\u> (c) <u/> (d) </u>
-
29.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Good morning!</h2>
<p>Fun facts</p>
<h2>My best friend</h2>
<p>My best friend</p> - 30.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) width (b) A happy dog (c) dog.jpg (d) The full moon -
32.💬 How many paragraphs show on the page?
<p>The red kite</p>
<p>Our school trip</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>I love mangoes.</p> -->
<!-- <p>Good morning!</p> --> - 33.Which of these has a closing tag? (a) <br> (b) <input> (c) <ul> (d) <hr>
- 34.🔤 In “HTML”, what does the L stand for? (a) Link (b) Language (c) Laptop (d) Line
- 35.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
-
36.🔍 Which line is missing its closing tag?
line 1: <i>My pets</i>
line 2: <strong>I love mangoes.
line 3: <h1>The red kite</h1> (a) line 1 (b) line 3 (c) line 2 -
37.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) tiger.jpg (b) A red kite (c) width (d) A tiger asleep - 38.True or false: <ul> is an ordered list. (a) False (b) True
- 39.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</html>”? (a) </html> (b) <!DOCTYPE html>
-
40.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="350"> (a) width (b) Our school bus (c) moon.png (d) The full moon
Answer key
- 4
- 2
- <a>
- No
- <!--
- <li>
- Yes
- <h1>
- False
- in a new tab
- </h1>
- 6
- Markup
- False
- an empty tag
- No
- alt
- on the browser tab
- </i>
- False
- False
- True
- No
- in the body
- True
- 11
- </h3>
- </u>
- 3
- an empty tag
- A happy dog
- 2
- <ul>
- Language
- False
- line 2
- A tiger asleep
- False
- <!DOCTYPE html>
- The full moon
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids