← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 397 · 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: <h2>, <h3>, <h6> or <h4>? (a) <h3> (b) <h4> (c) <h2> (d) <h6>
  2. 2.📋 What number does the browser show next to “Jamun”?
    <ol start="4">
      <li>Guava</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ol>
  3. 3.🔍 Which line is missing its closing tag?
    line 1: <small>I love mangoes.
    line 2: <h2>Fun facts</h2>
    line 3: <p>Our school trip</p>
    (a) line 2 (b) line 3 (c) line 1
  4. 4.True or false: HTML on its own cannot add up two numbers. (a) False (b) True
  5. 5.True or false: a web browser turns HTML into a page. (a) True (b) False
  6. 6.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) Easy snacks (c) body (d) My Hobbies
  7. 7.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Roses are red</p>
  8. 8.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    <p>Rain today</p>
    (a) My pets (b) Rain today (c) I love mangoes. (d) Good morning!
  9. 9.🔗 Where does this link open?
    <a href="https://example.com">About us</a>
    (a) in a new tab (b) in the same tab
  10. 10.🖼️ 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
  11. 11.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
  12. 12.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  13. 13.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h4>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
  14. 14.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
  15. 15.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="350">
  16. 16.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>I love mangoes.</p>
    <p>Rain today</p>
  17. 17.Which of these has a closing tag? (a) <img> (b) <br> (c) <p> (d) <hr>
  18. 18.🔗 Which address opens when you click this link?
    <a href="quiz.html">Visit the site</a>
    (a) Visit the site (b) about.html (c) quiz.html (d) games.html
  19. 19.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h3>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
  20. 20.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h1>? (a) <h3> (b) <h4> (c) <h1> (d) <h5>
  21. 21.True or false: HTML on its own can count button clicks. (a) True (b) False
  22. 22.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <h3> (d) <p>
  23. 23.🏷️ Which is the closing tag for <p>? (a) <p/> (b) <p> (c) </p> (d) <\p>
  24. 24.💬 How does an HTML comment start? (a) // (b) # (c) <!-- (d) /*
  25. 25.True or false: in <img>, src names the picture file. (a) True (b) False
  26. 26.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  27. 27.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  28. 28.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a hash # (d) a dollar $
  29. 29.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) href (b) About us (c) Contact us (d) https://example.com
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
  31. 31.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow</p>
  32. 32.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  33. 33.Which of these is an opening tag? (a) </p> (b) </h1> (c) </b> (d) <title>
  34. 34.Which of these goes in the body? (a) <a> (b) <link rel="stylesheet"> (c) <title> (d) <meta charset="utf-8">
  35. 35.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  36. 36.🔗 Which words do you click on?
    <a href="maths.html">Contact us</a>
    (a) href (b) Contact us (c) maths.html (d) Visit the site
  37. 37.True or false: HTML on its own can make a form. (a) True (b) False
  38. 38.Which of these is an empty tag? (a) <p> (b) <meta> (c) <ul> (d) <b>
  39. 39.📄 Where does the text of <title> appear? (a) at the bottom (b) on the browser tab (c) nowhere (d) in a big heading
  40. 40.🔍 One closing tag is missing. Which one?
    <h2>I love mangoes.</h2>
    <p>My best friend</p>
    <em>Cricket is fun.
    (a) </p> (b) </h2> (c) </em> (d) </b>

Answer key

  1. <h2>
  2. 8
  3. line 1
  4. True
  5. True
  6. Easy snacks
  7. 2
  8. Good morning!
  9. in the same tab
  10. to describe the image
  11. <ol>
  12. in the head
  13. <h1>
  14. <ol>
  15. 350
  16. 1
  17. <p>
  18. quiz.html
  19. <h1>
  20. <h5>
  21. False
  22. <h6>
  23. </p>
  24. <!--
  25. True
  26. a closing tag
  27. Yes
  28. a slash /
  29. About us
  30. 1
  31. 2
  32. has a closing tag
  33. <title>
  34. <a>
  35. in the body
  36. Contact us
  37. True
  38. <meta>
  39. on the browser tab
  40. </em>

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