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: <ol> is an unordered list. (a) True (b) False
- 2.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h3>? (a) <h3> (b) <h2> (c) <h5> (d) <h4>
- 3.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 4.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) alt (d) width
- 5.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <h2/> (c) <\h2> (d) </h2>
-
6.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>My best friend</p>
<!-- <p>Fun facts</p> -->
<p>The red kite</p> (a) Rain today (b) The red kite (c) Fun facts (d) My best friend - 7.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
-
8.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>I love mangoes.</p> -->
<p>My best friend</p>
<p>Rain today</p> (a) My best friend (b) My pets (c) Rain today (d) I love mangoes. - 9.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
10.🔍 One closing tag is missing. Which one?
<i>Fun facts</i>
<strong>Our school trip
<h2>Rain today</h2> (a) </strong> (b) </h2> (c) </u> (d) </i> - 11.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
-
12.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Mango</li>
<li>Banana</li>
<li>Jamun</li>
</ol> - 13.🏷️ Which is the closing tag for <b>? (a) <b/> (b) <\b> (c) </b> (d) <b>
- 14.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h4> or <h1>? (a) <h4> (b) <h1> (c) <h3> (d) <h5>
- 15.True or false: <ol> is one item of a list. (a) True (b) False
- 16.True or false: <p> is an empty tag. (a) False (b) True
- 17.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) address (d) editor
- 18.True or false: <title> goes in the head. (a) False (b) True
- 19.Which of these is a closing tag? (a) <li> (b) <b> (c) <p> (d) </b>
- 20.True or false: <li> lists things in any order. (a) False (b) True
-
21.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Fun facts</p> -->
<p>The red kite</p> - 22.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h4> or <h5>? (a) <h3> (b) <h6> (c) <h4> (d) <h5>
-
23.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h4>Our school trip</h4>
<h2>The red kite</h2> - 24.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) src (c) height (d) alt
-
25.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p>
<p>The red kite</p> (a) I love mangoes. (b) Rain today (c) The red kite -
26.📋 What number does the browser show next to “Orange”?
<ol>
<li>Jamun</li>
<li>Orange</li>
<li>Litchi</li>
</ol> - 27.True or false: <ul> is an empty tag. (a) True (b) False
- 28.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <ul> (d) <p>
-
29.📋 What number does the browser show next to “Litchi”?
<ol start="2">
<li>Mango</li>
<li>Litchi</li>
<li>Banana</li>
<li>Grapes</li>
<li>Guava</li>
</ol> -
30.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Good morning!</p>
<p>My pets</p>
<h4>Cricket is fun.</h4> -
31.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Cricket is fun.</p>
<p>The red kite</p>
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p> - 32.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
- 33.🏷️ Which is the closing tag for <small>? (a) <small/> (b) <\small> (c) </small> (d) <small>
-
34.📋 What number does the browser show next to “Guava”?
<ol start="9">
<li>Papaya</li>
<li>Jamun</li>
<li>Guava</li>
</ol> -
35.🔍 One closing tag is missing. Which one?
<strong>The red kite
<p>Rain today</p>
<h1>Good morning!</h1> (a) </p> (b) </h1> (c) </h3> (d) </strong> - 36.🏷️ Which is the closing tag for <p>? (a) </p> (b) <p/> (c) <\p> (d) <p>
- 37.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h3>? (a) <h2> (b) <h1> (c) <h4> (d) <h3>
- 38.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 39.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 40.💬 Does the browser show comments on the page? (a) Yes (b) No
Answer key
- False
- <h5>
- an opening tag
- src
- </h2>
- Fun facts
- <ol>
- I love mangoes.
- has a closing tag
- </strong>
- a web browser
- 4
- </b>
- <h5>
- False
- False
- element
- True
- </b>
- False
- 2
- <h3>
- 3
- alt
- Rain today
- 2
- False
- <li>
- 3
- 2
- 4
- 1
- </small>
- 11
- </strong>
- </p>
- <h1>
- True
- in the head
- No
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids