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 is true of a code editor? (a) hosts websites online (b) is where we type code (c) sends pages over the net (d) has an address bar
- 2.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
-
3.🔍 One closing tag is missing. Which one?
<h2>Hello, world!
<small>Fun facts</small>
<i>Good morning!</i> (a) </i> (b) </h3> (c) </small> (d) </h2> - 4.💬 How does an HTML comment start? (a) // (b) /* (c) <!-- (d) #
-
5.🔍 One closing tag is missing. Which one?
<h2>Hello, world!</h2>
<b>Fun facts</b>
<u>Our school trip (a) </b> (b) </h3> (c) </u> (d) </h2> - 6.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
- 7.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h6> or <h1>? (a) <h6> (b) <h5> (c) <h1> (d) <h2>
- 8.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
- 9.📄 Can HTML on its own keep a high score? (a) Yes (b) No
- 10.True or false: <img> goes in the head. (a) True (b) False
- 11.📄 Where does the text of <title> appear? (a) on the browser tab (b) in a big heading (c) nowhere (d) at the bottom
-
12.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>Rain today</p>
<p>Hello, world!</p> - 13.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 14.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <li> (d) <p>
- 15.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dot . (d) a dollar $
- 16.🌐 Which one sends pages over the net? (a) a web server (b) a code editor (c) a web browser
-
17.🔗 Which address opens when you click this link?
<a href="quiz.html">Contact us</a> (a) games.html (b) about.html (c) quiz.html (d) Contact us - 18.📋 Which list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>
- 19.True or false: HTML on its own can pick a random number. (a) True (b) False
- 20.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <p> (d) <h3>
- 21.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 22.Which of these is a closing tag? (a) <body> (b) </li> (c) <b> (d) <li>
-
23.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h2>Rain today</h2>
<h3>My best friend</h3>
<h4>Fun facts</h4>
<h4>Hello, world!</h4> -
24.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) href (b) games.html (c) Visit the site (d) Contact us -
25.🔠 How many headings are in this code?
<h1>My pets</h1>
<h3>I love mangoes.</h3>
<p>Cricket is fun.</p> - 26.📄 Can HTML on its own count button clicks? (a) Yes (b) No
- 27.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Language (c) Link (d) Line
- 28.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
-
29.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Hello, world!</p>
<p>My pets</p>
<h2>Rain today</h2> - 30.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
-
31.🔍 Which line is missing its closing tag?
line 1: <strong>Fun facts</strong>
line 2: <p>Our school trip
line 3: <em>My best friend</em> (a) line 3 (b) line 1 (c) line 2 - 32.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h3> or <h6>? (a) <h4> (b) <h5> (c) <h3> (d) <h6>
-
33.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> --> -
34.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>Hello, world!</h2>
<h4>My pets</h4> - 35.🖼️ Which attribute of <img> names the picture file? (a) alt (b) src (c) height (d) width
-
36.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>Our school trip</p> -->
<p>Hello, world!</p> - 37.True or false: <li> lists steps in order. (a) False (b) True
- 38.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h6> or <h2>? (a) <h3> (b) <h5> (c) <h6> (d) <h2>
- 39.Which of these goes in the body? (a) <table> (b) <title> (c) <style> (d) <meta charset="utf-8">
-
40.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Litchi</li>
<li>Papaya</li>
</ul> (a) bullets (b) numbers
Answer key
- is where we type code
- in the body
- </h2>
- <!--
- </u>
- <ol>
- <h6>
- -->
- No
- False
- on the browser tab
- 3
- a closing tag
- <li>
- a slash /
- a web server
- quiz.html
- <li>
- False
- <h6>
- No
- </li>
- 5
- Contact us
- 2
- No
- Language
- in the body
- 2
- <ul>
- line 2
- <h6>
- 2
- 3
- src
- 2
- False
- <h2>
- <table>
- bullets
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids