← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 159 · 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.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to describe the image (d) to colour it
  2. 2.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  3. 3.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h3> or <h2>? (a) <h6> (b) <h4> (c) <h3> (d) <h2>
  4. 4.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  5. 5.Which of these has a closing tag? (a) <p> (b) <meta> (c) <img> (d) <input>
  6. 6.🌐 Which one shows line numbers? (a) a code editor (b) a web server (c) a web browser
  7. 7.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h6> or <h4>? (a) <h3> (b) <h6> (c) <h4> (d) <h1>
  8. 8.🔗 Where does this link open?
    <a href="games.html">Art corner</a>
    (a) in a new tab (b) in the same tab
  9. 9.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h5>? (a) <h1> (b) <h2> (c) <h4> (d) <h5>
  10. 10.Which of these is an empty tag? (a) <title> (b) <p> (c) <b> (d) <input>
  11. 11.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="150">
  12. 12.Which of these is true of a web server? (a) is where we type code (b) colours code to help us (c) saves our .html files (d) hosts websites online
  13. 13.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Cricket is fun.</p> -->
  14. 14.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) < (d) {
  15. 15.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) A tiger asleep (b) width (c) tiger.jpg (d) A red kite
  16. 16.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <p>The red kite</p>
  17. 17.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h1> or <h5>? (a) <h5> (b) <h4> (c) <h1> (d) <h6>
  18. 18.🔗 Where does this link open?
    <a href="games.html">About us</a>
    (a) in the same tab (b) in a new tab
  19. 19.🔗 Where does this link open?
    <a href="https://example.com">About us</a>
    (a) in a new tab (b) in the same tab
  20. 20.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
  21. 21.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  22. 22.True or false: <table> goes in the body. (a) True (b) False
  23. 23.Which of these is a closing tag? (a) <h1> (b) <body> (c) <b> (d) </p>
  24. 24.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  25. 25.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) element (d) attribute
  26. 26.Which of these is a closing tag? (a) <li> (b) </h1> (c) <h1> (d) <p>
  27. 27.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>Fun facts</p> -->
  28. 28.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  29. 29.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
  30. 30.🔗 Which address opens when you click this link?
    <a href="quiz.html">Art corner</a>
    (a) Art corner (b) about.html (c) games.html (d) quiz.html
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <p>The red kite</p>
  32. 32.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Grapes</li>
    </ul>
  33. 33.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) tiger.jpg (b) fort.jpg (c) kite.png (d) An old fort
  34. 34.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h1>? (a) <h2> (b) <h3> (c) <h1> (d) <h4>
  35. 35.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  36. 36.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h4>? (a) <h4> (b) <h3> (c) <h5> (d) <h1>
  37. 37.True or false: <p> goes in the body. (a) True (b) False
  38. 38.🔍 Which is the odd one out? (a) shows line numbers (b) is where we type code (c) turns HTML into a page (d) colours code to help us
  39. 39.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) Cricket Club (c) body (d) Welcome!
  40. 40.🔍 Which is the odd one out? (a) has an address bar (b) turns HTML into a page (c) colours code to help us (d) shows pages from the web

Answer key

  1. to describe the image
  2. True
  3. <h2>
  4. an opening tag
  5. <p>
  6. a code editor
  7. <h6>
  8. in the same tab
  9. <h1>
  10. <input>
  11. 150
  12. hosts websites online
  13. 1
  14. <
  15. A tiger asleep
  16. 3
  17. <h1>
  18. in the same tab
  19. in the same tab
  20. <a>
  21. Yes
  22. True
  23. </p>
  24. a closing tag
  25. element
  26. </h1>
  27. 2
  28. in the body
  29. 3
  30. quiz.html
  31. 2
  32. 2
  33. fort.jpg
  34. <h1>
  35. has a closing tag
  36. <h5>
  37. True
  38. turns HTML into a page
  39. Welcome!
  40. colours code to help us

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