← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 31 · 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.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h3>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>
  2. 2.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h3> or <h1>? (a) <h3> (b) <h2> (c) <h5> (d) <h1>
  3. 3.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
  4. 4.🔗 Which address opens when you click this link?
    <a href="https://example.com">Maths fun</a>
    (a) art.html (b) Maths fun (c) https://example.com (d) maths.html
  5. 5.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) id (d) src
  6. 6.🔍 One closing tag is missing. Which one?
    <h2>I love mangoes.</h2>
    <small>My pets</small>
    <em>Our school trip
    (a) </strong> (b) </em> (c) </h2> (d) </small>
  7. 7.🏷️ Which is the closing tag for <u>? (a) </u> (b) <\u> (c) <u/> (d) <u>
  8. 8.Which of these is an opening tag? (a) </li> (b) </b> (c) </h1> (d) <body>
  9. 9.🔍 One closing tag is missing. Which one?
    <u>Fun facts</u>
    <strong>Our school trip
    <i>The red kite</i>
    (a) </strong> (b) </h3> (c) </u> (d) </i>
  10. 10.True or false: a web browser hosts websites online. (a) True (b) False
  11. 11.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Birds sing</p>
  12. 12.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <p> (d) <li>
  13. 13.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Mango</li>
    </ul>
    (a) bullets (b) numbers
  14. 14.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <!-- <p>I love mangoes.</p> -->
  15. 15.🔠 Are headings shown in bold by default? (a) No (b) Yes
  16. 16.🧱 HTML gives a web page its ___. (a) sound (b) speed (c) structure (d) colours
  17. 17.📋 What number does the browser show next to “Mango”?
    <ol start="7">
      <li>Litchi</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  18. 18.Which of these is true of a web server? (a) stores a website’s files (b) colours code to help us (c) has an address bar (d) shows pages from the web
  19. 19.📋 What number does the browser show next to “Grapes”?
    <ol start="5">
      <li>Banana</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>
  20. 20.🔗 Where does this link open?
    <a href="art.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  21. 21.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h4>? (a) <h5> (b) <h4> (c) <h3> (d) <h1>
  22. 22.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
  23. 23.True or false: a web browser opens web pages for us. (a) False (b) True
  24. 24.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ol>
    (a) bullets (b) numbers
  25. 25.True or false: <ul> is one item of a list. (a) True (b) False
  26. 26.True or false: <style> goes in the body. (a) False (b) True
  27. 27.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  28. 28.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h2> or <h5>? (a) <h2> (b) <h4> (c) <h6> (d) <h5>
  29. 29.True or false: <li> goes inside ul or ol. (a) True (b) False
  30. 30.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Orange</li>
    </ul>
  31. 31.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a src="about.html">
  32. 32.🌐 Which one stores a website’s files? (a) a web server (b) a web browser (c) a code editor
  33. 33.🔗 Where does this link open?
    <a href="art.html" target="_blank">School news</a>
    (a) in the same tab (b) in a new tab
  34. 34.Which of these is a closing tag? (a) </h1> (b) <body> (c) <title> (d) <h1>
  35. 35.True or false: HTML on its own can make links to pages. (a) True (b) False
  36. 36.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <h4>My pets</h4>
    <p>My pets</p>
  37. 37.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <p>My best friend</p>
  38. 38.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) cake.jpg (b) moon.png (c) Birthday cake (d) dog.jpg
  39. 39.💬 How does an HTML comment start? (a) # (b) <!-- (c) // (d) /*
  40. 40.📝 What does <p> make? (a) a paragraph (b) a link (c) a picture (d) a table

Answer key

  1. <h1>
  2. <h5>
  3. to describe the image
  4. https://example.com
  5. href
  6. </em>
  7. </u>
  8. <body>
  9. </strong>
  10. False
  11. 2
  12. <li>
  13. bullets
  14. 2
  15. Yes
  16. structure
  17. 11
  18. stores a website’s files
  19. 10
  20. in a new tab
  21. <h1>
  22. 2
  23. True
  24. numbers
  25. False
  26. False
  27. a closing tag
  28. <h6>
  29. True
  30. 5
  31. <a href="about.html">
  32. a web server
  33. in a new tab
  34. </h1>
  35. True
  36. 2
  37. 1
  38. cake.jpg
  39. <!--
  40. a paragraph

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