← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 21 · 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.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow</p>
  2. 2.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h2> or <h6>? (a) <h6> (b) <h4> (c) <h2> (d) <h3>
  3. 3.🔗 Which address opens when you click this link?
    <a href="https://example.com">Visit the site</a>
    (a) https://example.com (b) Visit the site (c) maths.html (d) art.html
  4. 4.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <ul> (d) <hr>
  5. 5.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  6. 6.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>The red kite</p> -->
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
  7. 7.🔢 In a basic web page file, which comes first: “<body>” or “</body>”? (a) </body> (b) <body>
  8. 8.🔍 One closing tag is missing. Which one?
    <h2>Fun facts
    <p>Good morning!</p>
    <h1>The red kite</h1>
    (a) </p> (b) </h1> (c) </em> (d) </h2>
  9. 9.🔗 Which address opens when you click this link?
    <a href="games.html">About us</a>
    (a) contact.html (b) about.html (c) games.html (d) About us
  10. 10.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  11. 11.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
  12. 12.📝 What does <br> do? (a) starts a new line (b) makes a list (c) makes text bold (d) adds a picture
  13. 13.🔗 Where does this link open?
    <a href="about.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  14. 14.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as 5 spaces (c) as a dot (d) as one space
  15. 15.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  16. 16.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <p> (d) <img>
  17. 17.🔢 In a basic web page file, which comes first: “</body>” or “<body>”? (a) <body> (b) </body>
  18. 18.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
    <p>Rain today</p>
    (a) My pets (b) Fun facts (c) Rain today
  19. 19.🔢 In a basic web page file, which comes first: “</body>” or “</head>”? (a) </head> (b) </body>
  20. 20.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Cricket Club (b) body (c) Try this poha. (d) Planets
  21. 21.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  22. 22.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) Here is my best one. (c) Welcome! (d) Art Gallery
  23. 23.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>I love mangoes.</p>
    <h3>I love mangoes.</h3>
    <p>My pets</p>
    <h2>My best friend</h2>
  24. 24.📋 Which list tag is one item of a list? (a) <li> (b) <ul> (c) <ol>
  25. 25.🔍 One closing tag is missing. Which one?
    <h1>Rain today</h1>
    <b>I love mangoes.</b>
    <u>Hello, world!
    (a) </h1> (b) </p> (c) </u> (d) </b>
  26. 26.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
  27. 27.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Rain today</p>
    <p>My best friend</p>
    <h3>I love mangoes.</h3>
  28. 28.🔗 Which address opens when you click this link?
    <a href="quiz.html">About us</a>
    (a) games.html (b) about.html (c) About us (d) quiz.html
  29. 29.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h4>? (a) <h2> (b) <h6> (c) <h1> (d) <h4>
  30. 30.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h6>? (a) <h6> (b) <h2> (c) <h5> (d) <h1>
  31. 31.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <p> (d) <h6>
  32. 32.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>The red kite</p> -->
  33. 33.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  34. 34.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
  35. 35.True or false: HTML on its own can count button clicks. (a) True (b) False
  36. 36.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  37. 37.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  38. 38.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h2> (d) <h1>
  39. 39.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
  40. 40.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Welcome! (b) Thanks for visiting. (c) My Hobbies (d) body

Answer key

  1. 2
  2. <h2>
  3. https://example.com
  4. <ul>
  5. an opening tag
  6. 2
  7. <body>
  8. </h2>
  9. games.html
  10. has a closing tag
  11. 6
  12. starts a new line
  13. in a new tab
  14. as one space
  15. <ul>
  16. <img>
  17. <body>
  18. My pets
  19. </head>
  20. Planets
  21. 4
  22. Art Gallery
  23. 3
  24. <li>
  25. </u>
  26. False
  27. 2
  28. quiz.html
  29. <h1>
  30. <h1>
  31. <h6>
  32. 1
  33. No
  34. 2
  35. False
  36. has a closing tag
  37. Yes
  38. <h4>
  39. opens it in a new tab
  40. Welcome!

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