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.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
2.🔗 Which words do you click on?
<a href="art.html">School news</a> (a) href (b) Take the quiz (c) School news (d) art.html - 3.🏷️ Which is the closing tag for <small>? (a) <small/> (b) <small> (c) </small> (d) <\small>
-
4.🔍 One closing tag is missing. Which one?
<u>My best friend
<h2>My pets</h2>
<p>The red kite</p> (a) </i> (b) </h2> (c) </p> (d) </u> -
5.🔍 One closing tag is missing. Which one?
<h2>The red kite</h2>
<i>Hello, world!
<b>Fun facts</b> (a) </h3> (b) </b> (c) </i> (d) </h2> - 6.True or false: a web server hosts websites online. (a) False (b) True
- 7.True or false: <li> is an empty tag. (a) True (b) False
- 8.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 9.🖼️ Which attribute of <img> tells which image to load? (a) width (b) src (c) height (d) alt
- 10.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 11.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h6> or <h3>? (a) <h3> (b) <h4> (c) <h2> (d) <h6>
- 12.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
- 13.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
-
14.🔗 Where does this link open?
<a href="contact.html" target="_blank">Contact us</a> (a) in the same tab (b) in a new tab -
15.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Orange</li>
<li>Guava</li>
<li>Jamun</li>
</ol> - 16.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h3> (d) <h6>
- 17.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 18.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
19.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Kites fly high</p> - 20.Which of these is a closing tag? (a) </body> (b) <h1> (c) <b> (d) <title>
- 21.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h5> or <h3>? (a) <h2> (b) <h3> (c) <h5> (d) <h4>
- 22.Which of these has a closing tag? (a) <br> (b) <hr> (c) <b> (d) <meta>
- 23.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) opens it in a new tab (d) makes it bold
-
24.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>Rain today</p> -->
<p>The red kite</p> -
25.🔗 Which address opens when you click this link?
<a href="about.html">Contact us</a> (a) Contact us (b) https://example.com (c) contact.html (d) about.html - 26.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h3>? (a) <h1> (b) <h2> (c) <h3> (d) <h6>
- 27.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
-
28.📋 What number does the browser show next to “Banana”?
<ol start="2">
<li>Mango</li>
<li>Jamun</li>
<li>Orange</li>
<li>Litchi</li>
<li>Banana</li>
</ol> - 29.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
30.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Jamun</li>
<li>Grapes</li>
</ul> - 31.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h6> or <h3>? (a) <h6> (b) <h3> (c) <h1> (d) <h4>
-
32.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Jamun</li>
<li>Guava</li>
<li>Litchi</li>
</ul> -
33.🔗 Which words do you click on?
<a href="https://example.com">Maths fun</a> (a) href (b) Art corner (c) https://example.com (d) Maths fun - 34.💬 Does the browser show comments on the page? (a) Yes (b) No
- 35.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h2>? (a) <h4> (b) <h3> (c) <h2> (d) <h1>
-
36.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Mango</li>
<li>Papaya</li>
</ul> (a) bullets (b) numbers - 37.Which of these is true of a web server? (a) is where we type code (b) shows line numbers (c) has an address bar (d) stores a website’s files
-
38.🔗 Where does this link open?
<a href="games.html">Contact us</a> (a) in a new tab (b) in the same tab -
39.🔍 Which line is missing its closing tag?
line 1: <h3>Cricket is fun.
line 2: <u>The red kite</u>
line 3: <p>I love mangoes.</p> (a) line 3 (b) line 1 (c) line 2 - 40.🖼️ Which attribute of <img> names the picture file? (a) width (b) alt (c) height (d) src
Answer key
- Yes
- School news
- </small>
- </u>
- </i>
- True
- False
- an opening tag
- src
- Yes
- <h6>
- 1
- <ul>
- in a new tab
- 3
- <h6>
- has a closing tag
- an opening tag
- 2
- </body>
- <h5>
- <b>
- opens it in a new tab
- 2
- about.html
- <h6>
- in the body
- 6
- an opening tag
- 3
- <h1>
- 4
- Maths fun
- No
- <h4>
- bullets
- stores a website’s files
- in the same tab
- line 1
- src
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids