← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 947 · 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.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Guava</li>
    </ol>
  2. 2.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Orange</li>
    </ul>
    (a) bullets (b) numbers
  3. 3.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Banana</li>
    </ul>
    (a) bullets (b) numbers
  4. 4.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h6> (d) <h1>
  5. 5.🔗 Which address opens when you click this link?
    <a href="contact.html">About us</a>
    (a) maths.html (b) About us (c) contact.html (d) https://example.com
  6. 6.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>My best friend</p>
    <p>My best friend</p>
    <h3>Fun facts</h3>
  7. 7.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
  8. 8.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) width (c) src (d) height
  9. 9.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to describe the image (d) to load it faster
  10. 10.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="400">
    (a) fort.jpg (b) An old fort (c) A tiger asleep (d) width
  11. 11.True or false: <ol> is an ordered list. (a) True (b) False
  12. 12.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h4> or <h1>? (a) <h2> (b) <h4> (c) <h1> (d) <h3>
  13. 13.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
  14. 14.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) <h2/> (d) </h2>
  15. 15.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  16. 16.True or false: in <img>, width names the picture file. (a) True (b) False
  17. 17.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Art Gallery (b) Planets (c) body (d) Thanks for visiting.
  18. 18.🔗 Which words do you click on?
    <a href="maths.html">Take the quiz</a>
    (a) Take the quiz (b) maths.html (c) href (d) Play games
  19. 19.🔗 Which words do you click on?
    <a href="quiz.html">Maths fun</a>
    (a) quiz.html (b) Maths fun (c) href (d) Art corner
  20. 20.True or false: <style> goes in the body. (a) True (b) False
  21. 21.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red<br>Rivers flow<br>Stars shine<br>Sky is blue</p>
  22. 22.True or false: in <img>, width sets how wide it is. (a) True (b) False
  23. 23.True or false: <ul> is an unordered list. (a) True (b) False
  24. 24.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  25. 25.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h3>Hello, world!</h3>
    <h2>Good morning!</h2>
    <p>Hello, world!</p>
  26. 26.🔗 Which words do you click on?
    <a href="games.html">Art corner</a>
    (a) Art corner (b) School news (c) href (d) games.html
  27. 27.True or false: <ol> is an unordered list. (a) False (b) True
  28. 28.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  29. 29.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
  30. 30.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
  31. 31.🔗 Which attribute holds the address of a link? (a) href (b) src (c) alt (d) id
  32. 32.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
  33. 33.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
  34. 34.🔗 Where does this link open?
    <a href="https://example.com">About us</a>
    (a) in the same tab (b) in a new tab
  35. 35.True or false: a web browser colours code to help us. (a) False (b) True
  36. 36.💬 Does the browser show comments on the page? (a) Yes (b) No
  37. 37.Which of these is a closing tag? (a) <p> (b) <body> (c) <li> (d) </h1>
  38. 38.🔍 Which is the odd one out? (a) saves our .html files (b) opens web pages for us (c) colours code to help us (d) shows line numbers
  39. 39.🔠 Are headings shown in bold by default? (a) Yes (b) No
  40. 40.True or false: <li> is one item of a list. (a) False (b) True

Answer key

  1. 4
  2. bullets
  3. bullets
  4. <h1>
  5. contact.html
  6. 2
  7. 3
  8. width
  9. to describe the image
  10. An old fort
  11. True
  12. <h1>
  13. 6
  14. </h2>
  15. Yes
  16. False
  17. Planets
  18. Take the quiz
  19. Maths fun
  20. False
  21. 5
  22. True
  23. True
  24. False
  25. 3
  26. Art corner
  27. False
  28. No
  29. to leave notes
  30. 6
  31. href
  32. <a>
  33. <a href="about.html">
  34. in the same tab
  35. False
  36. No
  37. </h1>
  38. opens web pages for us
  39. Yes
  40. True

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