← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 484 · 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.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>My pets</p>
    <h3>The red kite</h3>
    <h2>My pets</h2>
    <h4>My best friend</h4>
  2. 2.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h2>? (a) <h6> (b) <h2> (c) <h3> (d) <h5>
  3. 3.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
    <p>Fun facts</p>
    <p>Rain today</p>
    (a) Fun facts (b) The red kite (c) Rain today (d) My best friend
  4. 4.True or false: in <img>, height describes the picture. (a) False (b) True
  5. 5.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Good morning!</p> -->
    <p>Our school trip</p>
    <p>Rain today</p>
    (a) Good morning! (b) Rain today (c) Our school trip (d) The red kite
  6. 6.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
  7. 7.Which of these is an empty tag? (a) <h1> (b) <ul> (c) <b> (d) <br>
  8. 8.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  9. 9.True or false: HTML on its own can pick a random number. (a) False (b) True
  10. 10.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Orange</li>
    </ol>
  11. 11.🖼️ Which attribute of <img> describes the picture? (a) alt (b) height (c) width (d) src
  12. 12.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
  13. 13.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h1> or <h6>? (a) <h4> (b) <h6> (c) <h3> (d) <h1>
  14. 14.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  15. 15.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) cake.jpg (b) A happy dog (c) Birthday cake (d) width
  16. 16.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
  17. 17.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <br> (d) <p>
  18. 18.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) src (c) width (d) height
  19. 19.🏷️ Which is the closing tag for <i>? (a) <i/> (b) <i> (c) </i> (d) <\i>
  20. 20.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
  21. 21.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) height (d) alt
  22. 22.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  23. 23.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="100">
    (a) Map of India (b) dog.jpg (c) map.png (d) cake.jpg
  24. 24.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h5> or <h1>? (a) <h4> (b) <h1> (c) <h5> (d) <h2>
  25. 25.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Fun facts</p>
    <!-- <p>My best friend</p> -->
    (a) Our school trip (b) Fun facts (c) My best friend
  26. 26.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ul>
  27. 27.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <h3>Fun facts</h3>
  28. 28.🔗 Which address opens when you click this link?
    <a href="https://example.com">Contact us</a>
    (a) art.html (b) Contact us (c) https://example.com (d) maths.html
  29. 29.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  30. 30.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <h2>Hello, world!</h2>
  31. 31.🔗 Where does this link open?
    <a href="maths.html">Art corner</a>
    (a) in a new tab (b) in the same tab
  32. 32.Which of these goes in the head? (a) <h1> (b) <img> (c) <link rel="stylesheet"> (d) <ul>
  33. 33.True or false: <ul> goes in the body. (a) True (b) False
  34. 34.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to load it faster (d) to describe the image
  35. 35.💬 How does an HTML comment end? (a) >> (b) // (c) */ (d) -->
  36. 36.🔗 Where does this link open?
    <a href="news.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  37. 37.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>Good morning!</p>
    <p>Our school trip</p>
    <h2>The red kite</h2>
  38. 38.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="150">
    (a) The full moon (b) fort.jpg (c) moon.png (d) bus.jpg
  39. 39.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>The red kite</p>
    (a) Good morning! (b) I love mangoes. (c) The red kite (d) My pets
  40. 40.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag

Answer key

  1. 4
  2. <h2>
  3. The red kite
  4. False
  5. Good morning!
  6. 5
  7. <br>
  8. an empty tag
  9. False
  10. 5
  11. alt
  12. <!DOCTYPE html>
  13. <h1>
  14. Yes
  15. Birthday cake
  16. 1
  17. <h1>
  18. alt
  19. </i>
  20. <ol>
  21. src
  22. has a closing tag
  23. map.png
  24. <h1>
  25. My best friend
  26. 5
  27. 2
  28. https://example.com
  29. in the head
  30. 2
  31. in the same tab
  32. <link rel="stylesheet">
  33. True
  34. to describe the image
  35. -->
  36. in a new tab
  37. 2
  38. moon.png
  39. I love mangoes.
  40. an opening tag

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