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>Cricket is fun.</p>
<!-- <p>Fun facts</p> -->
<p>The red kite</p> -
2.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Fun facts</p>
<!-- <p>Our school trip</p> --> (a) Cricket is fun. (b) Our school trip (c) Fun facts -
3.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Papaya</li>
</ol> - 4.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 6 (d) 3
-
5.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) https://example.com (b) About us (c) href (d) Contact us - 6.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 7.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 8.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 9.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
- 10.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
- 11.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
-
12.🔍 Which line is missing its closing tag?
line 1: <i>Rain today</i>
line 2: <b>Our school trip</b>
line 3: <u>The red kite (a) line 2 (b) line 3 (c) line 1 - 13.Which of these has a closing tag? (a) <img> (b) <meta> (c) <br> (d) <h1>
- 14.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Link (c) Line (d) Language
- 15.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 16.Which of these is true of a web browser? (a) shows line numbers (b) has an address bar (c) saves our .html files (d) answers page requests
- 17.📝 What does <hr> draw? (a) a picture (b) a link (c) a line across the page (d) a table
-
18.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>My pets</p>
<!-- <p>Rain today</p> -->
<p>The red kite</p>
<!-- <p>Cricket is fun.</p> --> -
19.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) width (b) dog.jpg (c) The full moon (d) A happy dog - 20.Which of these goes in the head? (a) <ul> (b) <meta charset="utf-8"> (c) <p> (d) <a>
- 21.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h3>? (a) <h3> (b) <h1> (c) <h2> (d) <h4>
- 22.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 23.True or false: <h1> goes in the head. (a) False (b) True
-
24.🔗 Which address opens when you click this link?
<a href="https://example.com">About us</a> (a) maths.html (b) About us (c) art.html (d) https://example.com -
25.🔗 Which address opens when you click this link?
<a href="about.html">About us</a> (a) https://example.com (b) contact.html (c) About us (d) about.html - 26.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
-
27.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h3>Our school trip</h3>
<p>Rain today</p>
<h4>I love mangoes.</h4>
<h2>Hello, world!</h2> - 28.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h2> or <h3>? (a) <h5> (b) <h6> (c) <h2> (d) <h3>
- 29.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h6>? (a) <h3> (b) <h2> (c) <h1> (d) <h6>
- 30.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
- 31.True or false: in <img>, alt names the picture file. (a) False (b) True
- 32.True or false: in <img>, alt shows if the image fails. (a) False (b) True
-
33.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Fun facts</p>
<!-- <p>Hello, world!</p> --> (a) Hello, world! (b) Fun facts (c) I love mangoes. - 34.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h4> or <h6>? (a) <h4> (b) <h3> (c) <h6> (d) <h2>
- 35.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a slash / (d) a dollar $
- 36.True or false: in <img>, width shows if the image fails. (a) True (b) False
-
37.📋 What number does the browser show next to “Mango”?
<ol start="4">
<li>Banana</li>
<li>Mango</li>
<li>Guava</li>
</ol> - 38.💬 How does an HTML comment start? (a) // (b) <!-- (c) /* (d) #
- 39.📝 What do we need to write HTML? (a) a microphone (b) a paintbrush (c) a printer (d) a plain text editor
- 40.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h6> or <h1>? (a) <h4> (b) <h1> (c) <h6> (d) <h5>
Answer key
- 2
- Our school trip
- 2
- 6
- About us
- an opening tag
- in the body
- Yes
- in the body
- a web server
- True
- line 3
- <h1>
- Language
- Yes
- has an address bar
- a line across the page
- 3
- A happy dog
- <meta charset="utf-8">
- <h1>
- in the head
- False
- https://example.com
- about.html
- a web server
- 4
- <h2>
- <h6>
- <img>
- False
- True
- Hello, world!
- <h6>
- a slash /
- False
- 5
- <!--
- a plain text editor
- <h6>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids