← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 107 · 40 questions
TalentJR

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. 1.🔍 One closing tag is missing. Which one?
    <i>My best friend
    <h1>My pets</h1>
    <p>Our school trip</p>
    (a) </h1> (b) </em> (c) </i> (d) </p>
  2. 2.📝 What do we need to write HTML? (a) a printer (b) a microphone (c) a plain text editor (d) a paintbrush
  3. 3.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
  4. 4.True or false: HTML on its own cannot make a form. (a) False (b) True
  5. 5.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    (a) Hello, world! (b) Rain today (c) My pets
  6. 6.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <p>Fun facts</p>
    (a) Our school trip (b) My best friend (c) I love mangoes. (d) Fun facts
  7. 7.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) an attribute (d) a comment
  8. 8.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Good morning!</p>
    <h4>The red kite</h4>
    <p>Rain today</p>
    <p>Rain today</p>
  9. 9.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <h1> (d) <meta charset="utf-8">
  10. 10.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h2>? (a) <h1> (b) <h3> (c) <h2> (d) <h4>
  11. 11.📋 What number does the browser show next to “Mango”?
    <ol start="9">
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
  12. 12.True or false: a code editor saves our .html files. (a) True (b) False
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Stars shine<br>Sky is blue<br>Birds sing</p>
  14. 14.🔍 One closing tag is missing. Which one?
    <b>I love mangoes.
    <i>Good morning!</i>
    <h1>The red kite</h1>
    (a) </b> (b) </i> (c) </h1> (d) </em>
  15. 15.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Art Gallery (b) All about me (c) body (d) I like to read.
  16. 16.Which of these has a closing tag? (a) <input> (b) <meta> (c) <li> (d) <br>
  17. 17.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  18. 18.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
  19. 19.Which of these is an opening tag? (a) </h1> (b) </li> (c) </title> (d) <b>
  20. 20.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h6> or <h2>? (a) <h3> (b) <h6> (c) <h2> (d) <h4>
  21. 21.🔠 Are headings shown in bold by default? (a) Yes (b) No
  22. 22.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) height (c) alt (d) src
  23. 23.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h2> or <h4>? (a) <h5> (b) <h4> (c) <h2> (d) <h6>
  24. 24.True or false: <link rel="stylesheet"> goes in the head. (a) True (b) False
  25. 25.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  26. 26.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="100">
    (a) width (b) Our school bus (c) moon.png (d) The full moon
  27. 27.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Good morning!</p>
    <h3>Cricket is fun.</h3>
    <p>My pets</p>
    <p>Fun facts</p>
  28. 28.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->
  29. 29.🔗 Which address opens when you click this link?
    <a href="contact.html">Art corner</a>
    (a) maths.html (b) contact.html (c) Art corner (d) https://example.com
  30. 30.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h3>? (a) <h4> (b) <h3> (c) <h5> (d) <h1>
  31. 31.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
  32. 32.Which of these is an opening tag? (a) </b> (b) </li> (c) </title> (d) <h1>
  33. 33.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <!-- <p>Good morning!</p> -->
  34. 34.📋 Which list suits a shopping list in any order? (a) <ul> (b) <ol> (c) <br> (d) <hr>
  35. 35.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
  36. 36.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Rain today</p>
    <p>My best friend</p>
    <p>The red kite</p>
  37. 37.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to load it faster (d) to colour it
  38. 38.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Mango</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  39. 39.🔗 Which words do you click on?
    <a href="art.html">Play games</a>
    (a) Play games (b) About us (c) art.html (d) href
  40. 40.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag

Answer key

  1. </i>
  2. a plain text editor
  3. 3
  4. False
  5. Rain today
  6. Our school trip
  7. an attribute
  8. 2
  9. <h1>
  10. <h4>
  11. 11
  12. True
  13. 5
  14. </b>
  15. All about me
  16. <li>
  17. No
  18. src
  19. <b>
  20. <h2>
  21. Yes
  22. width
  23. <h2>
  24. True
  25. in the body
  26. The full moon
  27. 2
  28. 2
  29. contact.html
  30. <h1>
  31. <h6>
  32. <h1>
  33. 1
  34. <ul>
  35. <a>
  36. 4
  37. to describe the image
  38. bullets
  39. Play games
  40. has a closing tag

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids