← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 541 · 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.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Orange</li>
    </ul>
  2. 2.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <p> (d) <pic>
  3. 3.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ul>
  4. 4.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>My best friend</p> -->
    <p>Rain today</p>
    (a) Our school trip (b) My best friend (c) Rain today
  5. 5.True or false: <h1> goes in the head. (a) False (b) True
  6. 6.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h2>? (a) <h3> (b) <h6> (c) <h2> (d) <h1>
  7. 7.True or false: a web browser is where we type code. (a) True (b) False
  8. 8.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  9. 9.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) opens it in a new tab (d) makes it bold
  10. 10.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>My best friend</p> -->
    <p>The red kite</p>
    <p>Good morning!</p>
  11. 11.Which of these is an opening tag? (a) </body> (b) </b> (c) <b> (d) </p>
  12. 12.📄 Can HTML on its own make headings? (a) No (b) Yes
  13. 13.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="150">
  14. 14.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
  15. 15.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  17. 17.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an attribute (d) an element name
  18. 18.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>My best friend</p>
    <h4>Cricket is fun.</h4>
    <h4>The red kite</h4>
    <h3>Cricket is fun.</h3>
  19. 19.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <h3> (c) <\h3> (d) </h3>
  20. 20.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  21. 21.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ol>
  22. 22.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a dollar $ (d) a hash #
  23. 23.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
  24. 24.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h3> or <h1>? (a) <h3> (b) <h6> (c) <h5> (d) <h1>
  25. 25.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <hr> (d) <ul>
  26. 26.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="50">
    (a) Map of India (b) width (c) kite.png (d) A red kite
  27. 27.Which of these has a closing tag? (a) <meta> (b) <ul> (c) <hr> (d) <img>
  28. 28.True or false: a web browser opens web pages for us. (a) False (b) True
  29. 29.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="50">
  30. 30.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>My best friend</h2>
    <p>Rain today</p>
    <p>I love mangoes.</p>
  31. 31.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) src (d) id
  32. 32.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  33. 33.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h3> or <h4>? (a) <h1> (b) <h3> (c) <h4> (d) <h5>
  34. 34.Which of these is true of a web browser? (a) colours code to help us (b) shows line numbers (c) stores a website’s files (d) turns HTML into a page
  35. 35.True or false: <ul> lists things in any order. (a) False (b) True
  36. 36.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) href (b) contact.html (c) Visit the site (d) Contact us
  37. 37.🔗 Which words do you click on?
    <a href="art.html">Visit the site</a>
    (a) href (b) Maths fun (c) art.html (d) Visit the site
  38. 38.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) maths.html (b) https://example.com (c) Play games (d) contact.html
  39. 39.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
    <p>My pets</p>
    (a) Rain today (b) My pets (c) Our school trip
  40. 40.Which of these is a closing tag? (a) <b> (b) <p> (c) </b> (d) <title>

Answer key

  1. 2
  2. <img>
  3. 4
  4. My best friend
  5. False
  6. <h6>
  7. False
  8. an opening tag
  9. opens it in a new tab
  10. 2
  11. <b>
  12. Yes
  13. 150
  14. False
  15. a closing tag
  16. No
  17. an attribute
  18. 4
  19. </h3>
  20. Yes
  21. 6
  22. a slash /
  23. <ol>
  24. <h1>
  25. <ul>
  26. A red kite
  27. <ul>
  28. True
  29. 50
  30. 3
  31. href
  32. No
  33. <h1>
  34. turns HTML into a page
  35. True
  36. Contact us
  37. Visit the site
  38. contact.html
  39. Our school trip
  40. </b>

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