← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 618 · 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.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue<br>Rivers flow<br>Kites fly high<br>Roses are red</p>
  2. 2.True or false: HTML on its own can run a game loop. (a) True (b) False
  3. 3.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  4. 4.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Banana</li>
    </ol>
    (a) numbers (b) bullets
  5. 5.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
  6. 6.🏷️ Which is the closing tag for <b>? (a) <b> (b) <b/> (c) <\b> (d) </b>
  7. 7.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <p>I love mangoes.</p>
    (a) Our school trip (b) My pets (c) I love mangoes.
  8. 8.🏷️ Which is the closing tag for <p>? (a) <p/> (b) <p> (c) <\p> (d) </p>
  9. 9.🔢 In a basic web page file, which comes first: “</head>” or “</html>”? (a) </html> (b) </head>
  10. 10.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) height (c) src (d) alt
  11. 11.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  12. 12.True or false: <ol> lists things in any order. (a) False (b) True
  13. 13.🔗 Where does this link open?
    <a href="art.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  14. 14.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>My best friend</h2>
    <p>The red kite</p>
  15. 15.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <ul> (d) <li>
  16. 16.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to make it bigger (d) to colour it
  17. 17.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
    <p>Our school trip</p>
    (a) Rain today (b) Our school trip (c) My best friend
  18. 18.🔍 One closing tag is missing. Which one?
    <small>My best friend</small>
    <p>Our school trip</p>
    <b>My pets
    (a) </h2> (b) </p> (c) </b> (d) </small>
  19. 19.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h3>? (a) <h3> (b) <h5> (c) <h6> (d) <h4>
  20. 20.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
  21. 21.🔍 One closing tag is missing. Which one?
    <h2>My best friend
    <h3>Hello, world!</h3>
    <b>Fun facts</b>
    (a) </em> (b) </h3> (c) </h2> (d) </b>
  22. 22.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  23. 23.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="100">
    (a) width (b) Map of India (c) A red kite (d) kite.png
  24. 24.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) [ (d) (
  25. 25.Which of these is an empty tag? (a) <li> (b) <h1> (c) <input> (d) <title>
  26. 26.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    <p>Good morning!</p>
    (a) Good morning! (b) Fun facts (c) Our school trip
  27. 27.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  28. 28.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  29. 29.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
  30. 30.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) About us (b) href (c) Contact us (d) https://example.com
  31. 31.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <p> (d) <h6>
  32. 32.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  33. 33.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <style> (d) <h1>
  34. 34.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="350">
    (a) An old fort (b) tiger.jpg (c) fort.jpg (d) kite.png
  35. 35.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h4>The red kite</h4>
    <h4>My best friend</h4>
  36. 36.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="200">
    (a) width (b) Our school bus (c) The full moon (d) moon.png
  37. 37.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Banana</li>
    </ul>
  38. 38.🔗 Where does this link open?
    <a href="quiz.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  39. 39.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h4>Good morning!</h4>
    <h3>Good morning!</h3>
    <h2>Fun facts</h2>
  40. 40.True or false: <ol> shows bullet points. (a) False (b) True

Answer key

  1. 5
  2. False
  3. an opening tag
  4. numbers
  5. 2
  6. </b>
  7. Our school trip
  8. </p>
  9. </head>
  10. height
  11. has a closing tag
  12. False
  13. in a new tab
  14. 2
  15. <li>
  16. to describe the image
  17. Rain today
  18. </b>
  19. <h3>
  20. -->
  21. </h2>
  22. a closing tag
  23. A red kite
  24. <
  25. <input>
  26. Our school trip
  27. Yes
  28. No
  29. 2
  30. About us
  31. <h1>
  32. Yes
  33. <h1>
  34. fort.jpg
  35. 3
  36. The full moon
  37. 2
  38. in the same tab
  39. 4
  40. False

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