← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 195 · 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.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a closing tag (d) a comment
  2. 2.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Mango</li>
    </ul>
  3. 3.📋 What number does the browser show next to “Jamun”?
    <ol start="5">
      <li>Guava</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Grapes</li>
    </ol>
  4. 4.Which of these is an opening tag? (a) </body> (b) </h1> (c) <h1> (d) </p>
  5. 5.🔗 Which address opens when you click this link?
    <a href="https://example.com">About us</a>
    (a) maths.html (b) https://example.com (c) art.html (d) About us
  6. 6.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  7. 7.Which of these is true of a code editor? (a) answers page requests (b) sends pages over the net (c) shows pages from the web (d) shows line numbers
  8. 8.🏷️ HTML marks up text using ___. (a) keys (b) pixels (c) wires (d) tags
  9. 9.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>My pets</h4>
    <p>Cricket is fun.</p>
  10. 10.Which of these goes in the head? (a) <a> (b) <table> (c) <h1> (d) <title>
  11. 11.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="350">
    (a) Map of India (b) kite.png (c) A red kite (d) width
  12. 12.True or false: in <img>, src sets how tall it is. (a) False (b) True
  13. 13.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
  14. 14.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Easy snacks (b) Here is my best one. (c) body (d) Space Facts
  15. 15.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
    <p>My pets</p>
    (a) My pets (b) Good morning! (c) Rain today
  16. 16.Which of these is true of a web server? (a) is where we type code (b) shows pages from the web (c) turns HTML into a page (d) stores a website’s files
  17. 17.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h6>? (a) <h2> (b) <h6> (c) <h3> (d) <h4>
  18. 18.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
  19. 19.🔗 Which address opens when you click this link?
    <a href="games.html">School news</a>
    (a) contact.html (b) School news (c) games.html (d) about.html
  20. 20.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  21. 21.🔍 One closing tag is missing. Which one?
    <em>Our school trip
    <b>My best friend</b>
    <h2>I love mangoes.</h2>
    (a) </h2> (b) </h1> (c) </b> (d) </em>
  22. 22.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <style> (d) <ul>
  23. 23.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Rivers flow<br>Sky is blue</p>
  25. 25.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <ol> (d) <li>
  26. 26.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) Contact us (b) Visit the site (c) href (d) games.html
  27. 27.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
  28. 28.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  29. 29.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ol>
  30. 30.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
  31. 31.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>My pets</p>
    <p>Fun facts</p>
  32. 32.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h6> or <h2>? (a) <h2> (b) <h6> (c) <h4> (d) <h1>
  33. 33.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue<br>Stars shine<br>Birds sing</p>
  34. 34.💬 Does the browser show comments on the page? (a) No (b) Yes
  35. 35.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
  36. 36.🔍 Which is the odd one out? (a) turns HTML into a page (b) sends pages over the net (c) hosts websites online (d) stores a website’s files
  37. 37.True or false: in <img>, height shows if the image fails. (a) False (b) True
  38. 38.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h2> or <h5>? (a) <h2> (b) <h5> (c) <h1> (d) <h4>
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
    <p>Fun facts</p>
  40. 40.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
    (a) A red kite (b) A tiger asleep (c) width (d) tiger.jpg

Answer key

  1. an attribute
  2. 3
  3. 8
  4. <h1>
  5. https://example.com
  6. Yes
  7. shows line numbers
  8. tags
  9. 2
  10. <title>
  11. A red kite
  12. False
  13. opens it in a new tab
  14. Easy snacks
  15. Rain today
  16. stores a website’s files
  17. <h6>
  18. <a href="about.html">
  19. games.html
  20. 6
  21. </em>
  22. <ul>
  23. an empty tag
  24. 4
  25. <li>
  26. Contact us
  27. 3
  28. False
  29. 6
  30. <h1>
  31. 1
  32. <h6>
  33. 4
  34. No
  35. False
  36. turns HTML into a page
  37. False
  38. <h1>
  39. 2
  40. A tiger asleep

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