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 attribute of <img> describes the picture? (a) width (b) height (c) alt (d) src
- 2.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 3.True or false: in <img>, width names the picture file. (a) True (b) False
-
4.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Banana</li>
</ul> (a) numbers (b) bullets - 5.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
- 6.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
- 7.True or false: in <img>, alt shows if the image fails. (a) True (b) False
-
8.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>Fun facts</h2>
<p>I love mangoes.</p>
<p>My best friend</p>
<p>I love mangoes.</p>
<p>I love mangoes.</p> - 9.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
- 10.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h5>
-
11.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) Our school bus (b) tiger.jpg (c) bus.jpg (d) fort.jpg - 12.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 13.True or false: <h1> is an empty tag. (a) True (b) False
-
14.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p>
<p>Good morning!</p> (a) I love mangoes. (b) Good morning! (c) Hello, world! (d) Fun facts - 15.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) src (d) alt
- 16.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
-
17.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h2>The red kite</h2>
<p>Our school trip</p>
<h4>Fun facts</h4> - 18.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
- 19.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <h3> (c) <\h3> (d) </h3>
-
20.🔗 Which words do you click on?
<a href="games.html">Play games</a> (a) href (b) games.html (c) Play games (d) About us - 21.🔠 How many heading levels does HTML have? (a) 4 (b) 6 (c) 3 (d) 10
- 22.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <h2> (d) <\h2>
-
23.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Mango</li>
<li>Jamun</li>
</ol> - 24.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) </strong> (c) <\strong> (d) <strong>
-
25.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Our school trip</p>
<p>Fun facts</p> - 26.🏷️ Every HTML tag starts with which sign? (a) < (b) [ (c) { (d) (
-
27.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Fun facts</p>
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> --> (a) I love mangoes. (b) Fun facts (c) Good morning! (d) Hello, world! - 28.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 29.Which of these is true of a web browser? (a) sends pages over the net (b) hosts websites online (c) shows pages from the web (d) colours code to help us
- 30.Which of these is an empty tag? (a) <p> (b) <b> (c) <br> (d) <title>
- 31.Which of these is an opening tag? (a) <h1> (b) </li> (c) </body> (d) </h1>
- 32.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) width (d) height
- 33.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h4> or <h3>? (a) <h2> (b) <h4> (c) <h3> (d) <h6>
- 34.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
- 35.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
- 36.True or false: <li> is an ordered list. (a) False (b) True
- 37.Which of these is an opening tag? (a) </title> (b) </p> (c) </body> (d) <b>
-
38.🔍 Which line is missing its closing tag?
line 1: <h3>My pets
line 2: <h1>I love mangoes.</h1>
line 3: <h2>Rain today</h2> (a) line 2 (b) line 3 (c) line 1 - 39.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
- 40.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
Answer key
- alt
- an empty tag
- False
- bullets
- False
- in the body
- True
- 5
- in the body
- <h1>
- bus.jpg
- a closing tag
- False
- I love mangoes.
- alt
- <ol>
- 3
- a web server
- </h3>
- Play games
- 6
- </h2>
- 3
- </strong>
- 1
- <
- I love mangoes.
- No
- shows pages from the web
- <br>
- <h1>
- width
- <h2>
- <a>
- -->
- False
- <b>
- line 1
- in the body
- <ul>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids