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 does this code make?
<p>Cricket is fun.</p>
<h2>Fun facts</h2>
<p>Fun facts</p>
<p>I love mangoes.</p>
<p>Fun facts</p> -
2.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Litchi</li>
<li>Orange</li>
</ul> (a) numbers (b) bullets - 3.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h4> or <h2>? (a) <h6> (b) <h2> (c) <h4> (d) <h5>
- 4.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
5.🔍 Which line is missing its closing tag?
line 1: <em>Our school trip</em>
line 2: <h2>Good morning!
line 3: <h1>The red kite</h1> (a) line 2 (b) line 3 (c) line 1 - 6.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h1> or <h5>? (a) <h5> (b) <h6> (c) <h1> (d) <h2>
- 7.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
-
8.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>My best friend</p>
<!-- <p>The red kite</p> --> (a) My pets (b) The red kite (c) My best friend -
9.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h3>I love mangoes.</h3>
<p>Cricket is fun.</p> - 10.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 11.📄 Can HTML on its own keep a high score? (a) Yes (b) No
- 12.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 13.True or false: in <img>, alt is read by screen readers. (a) True (b) False
-
14.🔍 Which line is missing its closing tag?
line 1: <i>My best friend</i>
line 2: <em>Cricket is fun.</em>
line 3: <h3>The red kite (a) line 2 (b) line 3 (c) line 1 -
15.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Litchi</li>
<li>Mango</li>
</ol> (a) numbers (b) bullets - 16.💬 Does the browser show comments on the page? (a) Yes (b) No
-
17.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>Rain today</p>
<p>My best friend</p> (a) My best friend (b) Rain today (c) Good morning! -
18.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h3>I love mangoes.</h3>
<p>Our school trip</p>
<h2>I love mangoes.</h2> -
19.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab -
20.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>My best friend</p>
<!-- <p>My pets</p> -->
<p>Rain today</p> -
21.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) All about me (c) My Hobbies (d) index.html - 22.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
23.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Guava</li>
</ol> - 24.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
-
25.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Guava</li>
<li>Grapes</li>
</ul> -
26.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Kites fly high<br>Sky is blue<br>Stars shine<br>Birds sing</p> - 27.💬 How does an HTML comment end? (a) --> (b) >> (c) // (d) */
- 28.Which of these is true of a web browser? (a) stores a website’s files (b) has an address bar (c) hosts websites online (d) colours code to help us
- 29.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
- 30.🖼️ Which attribute of <img> names the picture file? (a) src (b) alt (c) width (d) height
-
31.🔗 Where does this link open?
<a href="https://example.com">Play games</a> (a) in the same tab (b) in a new tab - 32.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) { (d) <
-
33.📋 What number does the browser show next to “Banana”?
<ol start="6">
<li>Grapes</li>
<li>Guava</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Orange</li>
<li>Banana</li>
</ol> - 34.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
-
35.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>Our school trip</h2>
<p>The red kite</p>
<h2>Our school trip</h2>
<h2>Good morning!</h2>
<p>I love mangoes.</p> - 36.🏷️ Which is the closing tag for <p>? (a) <\p> (b) </p> (c) <p/> (d) <p>
-
37.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>I love mangoes.</p>
<h2>My best friend</h2>
<p>Hello, world!</p>
<h2>Rain today</h2> - 38.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) src (d) alt
- 39.Which of these is true of a code editor? (a) hosts websites online (b) has an address bar (c) shows line numbers (d) stores a website’s files
- 40.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
Answer key
- 4
- bullets
- <h6>
- an opening tag
- line 2
- <h6>
- <h1>
- The red kite
- 2
- Yes
- No
- has a closing tag
- True
- line 3
- numbers
- No
- Good morning!
- 3
- in a new tab
- 2
- My Hobbies
- in the head
- 2
- <img>
- 3
- 5
- -->
- has an address bar
- False
- src
- in the same tab
- <
- 11
- <ol>
- 3
- </p>
- 3
- alt
- shows line numbers
- href
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids