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.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) [ (d) (
-
2.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine<br>Kites fly high<br>Rivers flow<br>Birds sing</p> -
3.🔗 Which words do you click on?
<a href="games.html">About us</a> (a) games.html (b) href (c) About us (d) Contact us - 4.Which of these is a closing tag? (a) <li> (b) <b> (c) <h1> (d) </title>
- 5.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h3>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
-
6.🔠 How many headings are in this code?
<h1>My pets</h1>
<h4>Cricket is fun.</h4>
<p>Hello, world!</p>
<h2>Hello, world!</h2> - 7.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
- 8.True or false: <input> is an empty tag. (a) True (b) False
- 9.🖼️ Which attribute of <img> names the picture file? (a) src (b) height (c) alt (d) width
- 10.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 6 (d) 3
- 11.Which of these is a closing tag? (a) <b> (b) </b> (c) <li> (d) <body>
- 12.Which of these is an opening tag? (a) <body> (b) </li> (c) </title> (d) </b>
- 13.Which of these goes in the head? (a) <style> (b) <ul> (c) <a> (d) <h1>
- 14.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
- 15.💬 How does an HTML comment end? (a) // (b) */ (c) --> (d) >>
- 16.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) makes it blank (d) hides the link
-
17.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>Cricket is fun.</h2>
<p>The red kite</p>
<p>Our school trip</p>
<p>My pets</p>
<h2>I love mangoes.</h2> - 18.📄 Can HTML on its own make tables? (a) Yes (b) No
-
19.🔍 Which line is missing its closing tag?
line 1: <p>Fun facts</p>
line 2: <b>Cricket is fun.</b>
line 3: <h3>My pets (a) line 1 (b) line 2 (c) line 3 -
20.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Hello, world!</p>
<!-- <p>The red kite</p> -->
<p>My best friend</p> - 21.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h2>? (a) <h5> (b) <h2> (c) <h4> (d) <h1>
- 22.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a closing tag (d) a comment
- 23.True or false: <p> is an empty tag. (a) True (b) False
- 24.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 25.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) alt (c) src (d) height
- 26.Which of these is an opening tag? (a) </li> (b) </h1> (c) </p> (d) <p>
- 27.Which of these is an opening tag? (a) </b> (b) <h1> (c) </title> (d) </li>
- 28.📄 Can HTML on its own count button clicks? (a) Yes (b) No
- 29.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 30.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
-
31.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>Our school trip</p>
<p>Fun facts</p>
<p>My best friend</p> -
32.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red<br>Rivers flow<br>Kites fly high</p> -
33.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Litchi</li>
</ol> -
34.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>My pets</p>
<p>The red kite</p> -
35.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Orange</li>
<li>Papaya</li>
<li>Guava</li>
</ul> - 36.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 37.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
- 38.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Mouse (c) Markup (d) Modern
- 39.True or false: <ul> shows bullet points. (a) False (b) True
-
40.🔍 One closing tag is missing. Which one?
<u>Fun facts</u>
<h2>Good morning!
<h3>Hello, world!</h3> (a) </h3> (b) </h1> (c) </h2> (d) </u>
Answer key
- <
- 5
- About us
- </title>
- <h1>
- 3
- in the body
- True
- src
- 6
- </b>
- <body>
- <style>
- <ol>
- -->
- opens it in a new tab
- 4
- Yes
- line 3
- 2
- <h5>
- an attribute
- False
- has a closing tag
- alt
- <p>
- <h1>
- No
- in the head
- <!--
- 4
- 4
- 4
- 3
- 4
- an empty tag
- Yes
- Markup
- True
- </h2>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids