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 goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <h1> (d) <link rel="stylesheet">
- 2.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
-
3.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Papaya</li>
<li>Mango</li>
</ul> - 4.True or false: a web browser hosts websites online. (a) False (b) True
-
5.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Guava</li>
<li>Mango</li>
</ul> - 6.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) width (d) alt
- 7.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
8.🔍 One closing tag is missing. Which one?
<h3>My best friend</h3>
<em>I love mangoes.
<h1>Good morning!</h1> (a) </h1> (b) </b> (c) </em> (d) </h3> -
9.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Hello, world!</p>
<p>My best friend</p> -
10.🔍 Which line is missing its closing tag?
line 1: <h2>Our school trip</h2>
line 2: <strong>Hello, world!
line 3: <b>Cricket is fun.</b> (a) line 3 (b) line 2 (c) line 1 -
11.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="400"> (a) Map of India (b) A red kite (c) kite.png (d) width -
12.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>The red kite</p> --> -
13.🔗 Which words do you click on?
<a href="news.html">Maths fun</a> (a) news.html (b) Art corner (c) Maths fun (d) href - 14.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 15.Which of these is true of a web server? (a) sends pages over the net (b) has an address bar (c) shows pages from the web (d) opens web pages for us
- 16.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 17.Which of these goes in the head? (a) <h1> (b) <p> (c) <ul> (d) <title>
-
18.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red<br>Kites fly high</p> -
19.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>My pets</p>
<p>Hello, world!</p> - 20.True or false: <li> lists steps in order. (a) True (b) False
- 21.Which of these is an opening tag? (a) </p> (b) </h1> (c) <body> (d) </body>
-
22.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Mango</li>
<li>Litchi</li>
<li>Guava</li>
</ol> - 23.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h2>? (a) <h1> (b) <h4> (c) <h2> (d) <h5>
- 24.💬 How does an HTML comment end? (a) >> (b) */ (c) // (d) -->
- 25.True or false: <ol> is one item of a list. (a) True (b) False
- 26.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 27.Which of these is true of a web browser? (a) opens web pages for us (b) is where we type code (c) colours code to help us (d) sends pages over the net
- 28.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
- 29.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 30.True or false: HTML on its own can make bullet lists. (a) False (b) True
- 31.True or false: a web browser shows line numbers. (a) False (b) True
-
32.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) Maths fun (b) contact.html (c) href (d) Visit the site - 33.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) makes a list (d) starts a new line
- 34.Which of these is a closing tag? (a) <h1> (b) <b> (c) </title> (d) <title>
- 35.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
36.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Fun facts</p>
<p>I love mangoes.</p>
<p>Fun facts</p>
<h2>Rain today</h2> - 37.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
- 38.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 39.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h5> (d) <h1>
- 40.True or false: HTML on its own can make headings. (a) False (b) True
Answer key
- <h1>
- <img>
- 3
- False
- 3
- alt
- a closing tag
- </em>
- 3
- line 2
- A red kite
- 1
- Maths fun
- an empty tag
- sends pages over the net
- an opening tag
- <title>
- 3
- 1
- False
- <body>
- 4
- <h5>
- -->
- False
- has a closing tag
- opens web pages for us
- a web browser
- an opening tag
- True
- False
- Visit the site
- starts a new line
- </title>
- No
- 4
- False
- Yes
- <h5>
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids