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.True or false: <h1> goes in the head. (a) True (b) False
- 2.True or false: a code editor opens web pages for us. (a) False (b) True
- 3.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 4.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an element name (d) an attribute
- 5.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 6.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h2> or <h6>? (a) <h2> (b) <h6> (c) <h5> (d) <h4>
- 7.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 8.Which of these is a closing tag? (a) </li> (b) <p> (c) <li> (d) <h1>
-
9.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Grapes</li>
<li>Jamun</li>
</ol> (a) numbers (b) bullets - 10.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
- 11.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) shows line numbers (d) shows pages from the web
- 12.💬 How does an HTML comment start? (a) # (b) // (c) <!-- (d) /*
- 13.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
-
14.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Rivers flow<br>Roses are red<br>Stars shine<br>Sky is blue</p> -
15.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Our school trip</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>Fun facts</p> -->
<p>My best friend</p> -
16.🔍 One closing tag is missing. Which one?
<small>I love mangoes.</small>
<h3>My pets
<p>Our school trip</p> (a) </u> (b) </h3> (c) </p> (d) </small> - 17.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Machine (c) Mouse (d) Markup
-
18.🔍 One closing tag is missing. Which one?
<h1>My pets
<p>Good morning!</p>
<strong>Fun facts</strong> (a) </strong> (b) </p> (c) </h2> (d) </h1> - 19.🌐 Which one has an address bar? (a) a code editor (b) a web browser (c) a web server
- 20.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 21.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 22.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) element (d) address
- 23.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h2>? (a) <h5> (b) <h4> (c) <h2> (d) <h1>
- 24.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
-
25.🔍 Which line is missing its closing tag?
line 1: <p>My best friend</p>
line 2: <strong>Cricket is fun.
line 3: <em>My pets</em> (a) line 1 (b) line 2 (c) line 3 - 26.Which of these is an empty tag? (a) <title> (b) <hr> (c) <ul> (d) <p>
-
27.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) index.html (c) All about me (d) Riya’s Recipes -
28.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Rain today</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Our school trip</p> - 29.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
- 30.Which of these is true of a code editor? (a) has an address bar (b) is where we type code (c) answers page requests (d) opens web pages for us
-
31.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>Good morning!</p> -->
<p>Rain today</p>
<p>Hello, world!</p> -
32.📋 What number does the browser show next to “Grapes”?
<ol start="9">
<li>Papaya</li>
<li>Guava</li>
<li>Grapes</li>
<li>Litchi</li>
<li>Orange</li>
<li>Mango</li>
</ol> - 33.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h5>? (a) <h5> (b) <h1> (c) <h2> (d) <h6>
- 34.True or false: in <img>, height sets how wide it is. (a) True (b) False
-
35.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine<br>Rivers flow<br>Birds sing<br>Sky is blue</p> -
36.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h3>Fun facts</h3>
<h2>Hello, world!</h2>
<h2>Rain today</h2> -
37.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Guava</li>
<li>Jamun</li>
<li>Grapes</li>
</ul> -
38.🔗 Where does this link open?
<a href="about.html">Visit the site</a> (a) in a new tab (b) in the same tab -
39.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>Rain today</p> -->
<p>Good morning!</p> - 40.🖼️ Which attribute of <img> describes the picture? (a) alt (b) height (c) src (d) width
Answer key
- False
- False
- Yes
- an attribute
- an opening tag
- <h2>
- an opening tag
- </li>
- numbers
- <a>
- shows line numbers
- <!--
- <ol>
- 5
- 2
- </h3>
- Markup
- </h1>
- a web browser
- No
- has a closing tag
- element
- <h1>
- -->
- line 2
- <hr>
- Riya’s Recipes
- 1
- Yes
- is where we type code
- 3
- 11
- <h6>
- False
- 5
- 4
- 4
- in the same tab
- 1
- alt
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids