← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 130 · 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.True or false: <ol> is an unordered list. (a) True (b) False
  2. 2.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h3>? (a) <h3> (b) <h2> (c) <h5> (d) <h4>
  3. 3.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  4. 4.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) alt (d) width
  5. 5.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <h2/> (c) <\h2> (d) </h2>
  6. 6.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
    (a) Rain today (b) The red kite (c) Fun facts (d) My best friend
  7. 7.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
  8. 8.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My best friend</p>
    <p>Rain today</p>
    (a) My best friend (b) My pets (c) Rain today (d) I love mangoes.
  9. 9.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  10. 10.🔍 One closing tag is missing. Which one?
    <i>Fun facts</i>
    <strong>Our school trip
    <h2>Rain today</h2>
    (a) </strong> (b) </h2> (c) </u> (d) </i>
  11. 11.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
  12. 12.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
  13. 13.🏷️ Which is the closing tag for <b>? (a) <b/> (b) <\b> (c) </b> (d) <b>
  14. 14.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h4> or <h1>? (a) <h4> (b) <h1> (c) <h3> (d) <h5>
  15. 15.True or false: <ol> is one item of a list. (a) True (b) False
  16. 16.True or false: <p> is an empty tag. (a) False (b) True
  17. 17.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) address (d) editor
  18. 18.True or false: <title> goes in the head. (a) False (b) True
  19. 19.Which of these is a closing tag? (a) <li> (b) <b> (c) <p> (d) </b>
  20. 20.True or false: <li> lists things in any order. (a) False (b) True
  21. 21.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
  22. 22.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h4> or <h5>? (a) <h3> (b) <h6> (c) <h4> (d) <h5>
  23. 23.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>Our school trip</h4>
    <h2>The red kite</h2>
  24. 24.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) src (c) height (d) alt
  25. 25.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    <p>The red kite</p>
    (a) I love mangoes. (b) Rain today (c) The red kite
  26. 26.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Litchi</li>
    </ol>
  27. 27.True or false: <ul> is an empty tag. (a) True (b) False
  28. 28.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <ul> (d) <p>
  29. 29.📋 What number does the browser show next to “Litchi”?
    <ol start="2">
      <li>Mango</li>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  30. 30.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Good morning!</p>
    <p>My pets</p>
    <h4>Cricket is fun.</h4>
  31. 31.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
  32. 32.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
  33. 33.🏷️ Which is the closing tag for <small>? (a) <small/> (b) <\small> (c) </small> (d) <small>
  34. 34.📋 What number does the browser show next to “Guava”?
    <ol start="9">
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  35. 35.🔍 One closing tag is missing. Which one?
    <strong>The red kite
    <p>Rain today</p>
    <h1>Good morning!</h1>
    (a) </p> (b) </h1> (c) </h3> (d) </strong>
  36. 36.🏷️ Which is the closing tag for <p>? (a) </p> (b) <p/> (c) <\p> (d) <p>
  37. 37.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h3>? (a) <h2> (b) <h1> (c) <h4> (d) <h3>
  38. 38.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  39. 39.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  40. 40.💬 Does the browser show comments on the page? (a) Yes (b) No

Answer key

  1. False
  2. <h5>
  3. an opening tag
  4. src
  5. </h2>
  6. Fun facts
  7. <ol>
  8. I love mangoes.
  9. has a closing tag
  10. </strong>
  11. a web browser
  12. 4
  13. </b>
  14. <h5>
  15. False
  16. False
  17. element
  18. True
  19. </b>
  20. False
  21. 2
  22. <h3>
  23. 3
  24. alt
  25. Rain today
  26. 2
  27. False
  28. <li>
  29. 3
  30. 2
  31. 4
  32. 1
  33. </small>
  34. 11
  35. </strong>
  36. </p>
  37. <h1>
  38. True
  39. in the head
  40. No

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