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 heading shows the SMALLEST text: <h2>, <h4>, <h5> or <h1>? (a) <h4> (b) <h5> (c) <h1> (d) <h2>
-
2.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>My best friend</p>
<p>My best friend</p>
<p>My pets</p> -
3.🔍 Which line is missing its closing tag?
line 1: <small>Cricket is fun.
line 2: <h1>Our school trip</h1>
line 3: <em>The red kite</em> (a) line 1 (b) line 2 (c) line 3 -
4.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p> (a) Good morning! (b) Fun facts (c) Cricket is fun. (d) I love mangoes. - 5.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
-
6.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) About us (b) href (c) contact.html (d) Play games -
7.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) Visit the site (b) href (c) games.html (d) Contact us - 8.True or false: in <img>, alt shows if the image fails. (a) True (b) False
- 9.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
10.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Roses are red<br>Rivers flow</p> - 11.True or false: <li> lists things in any order. (a) True (b) False
- 12.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) height (c) alt (d) src
- 13.True or false: <hr> has a closing tag. (a) False (b) True
- 14.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
-
15.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>My drawings</h1>
<p>Here is my best one.</p>
</body>
</html> (a) My drawings (b) Riya’s Recipes (c) Here is my best one. (d) index.html -
16.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) https://example.com (b) maths.html (c) Play games (d) contact.html - 17.True or false: <ul> lists steps in order. (a) True (b) False
- 18.True or false: a code editor shows line numbers. (a) True (b) False
- 19.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </html> (c) <head> (d) </head>
- 20.True or false: in <img>, src describes the picture. (a) True (b) False
-
21.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p> (a) Our school trip (b) Cricket is fun. (c) Hello, world! -
22.🔍 One closing tag is missing. Which one?
<u>Fun facts
<h1>Our school trip</h1>
<h2>Good morning!</h2> (a) </h1> (b) </h2> (c) </em> (d) </u> - 23.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h2> or <h1>? (a) <h2> (b) <h5> (c) <h6> (d) <h1>
-
24.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>My pets</p>
<!-- <p>Rain today</p> --> (a) Our school trip (b) Rain today (c) My pets - 25.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h2>? (a) <h4> (b) <h1> (c) <h2> (d) <h5>
- 26.Which of these has a closing tag? (a) <img> (b) <b> (c) <meta> (d) <br>
- 27.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
-
28.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>The red kite</p>
<!-- <p>Cricket is fun.</p> --> - 29.🏷️ Which is the closing tag for <i>? (a) </i> (b) <i/> (c) <i> (d) <\i>
- 30.True or false: <li> shows bullet points. (a) False (b) True
- 31.True or false: a web server sends pages over the net. (a) True (b) False
- 32.Which of these is an opening tag? (a) </b> (b) </h1> (c) </li> (d) <title>
- 33.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
-
34.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> -->
<p>Fun facts</p> (a) Our school trip (b) Fun facts (c) Cricket is fun. - 35.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 36.True or false: <li> is an empty tag. (a) True (b) False
-
37.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Orange</li>
<li>Banana</li>
</ol> (a) numbers (b) bullets - 38.Which of these goes in the body? (a) <title> (b) <h1> (c) <meta charset="utf-8"> (d) <link rel="stylesheet">
-
39.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p>
<p>The red kite</p>
<p>I love mangoes.</p> (a) Fun facts (b) Cricket is fun. (c) I love mangoes. (d) The red kite - 40.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <a> (d) <pic>
Answer key
- <h5>
- 1
- line 1
- I love mangoes.
- -->
- Play games
- Contact us
- True
- No
- 3
- False
- alt
- False
- a code editor
- Riya’s Recipes
- contact.html
- False
- True
- </html>
- False
- Hello, world!
- </u>
- <h6>
- Rain today
- <h5>
- <b>
- in the body
- 1
- </i>
- False
- True
- <title>
- <!--
- Our school trip
- Yes
- False
- numbers
- <h1>
- Cricket is fun.
- <img>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids