← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 165 · 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: <h1> goes in the head. (a) True (b) False
  2. 2.True or false: a code editor opens web pages for us. (a) False (b) True
  3. 3.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  4. 4.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an element name (d) an attribute
  5. 5.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  6. 6.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h2> or <h6>? (a) <h2> (b) <h6> (c) <h5> (d) <h4>
  7. 7.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  8. 8.Which of these is a closing tag? (a) </li> (b) <p> (c) <li> (d) <h1>
  9. 9.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  10. 10.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
  11. 11.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) shows line numbers (d) shows pages from the web
  12. 12.💬 How does an HTML comment start? (a) # (b) // (c) <!-- (d) /*
  13. 13.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
  14. 14.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow<br>Roses are red<br>Stars shine<br>Sky is blue</p>
  15. 15.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
  16. 16.🔍 One closing tag is missing. Which one?
    <small>I love mangoes.</small>
    <h3>My pets
    <p>Our school trip</p>
    (a) </u> (b) </h3> (c) </p> (d) </small>
  17. 17.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Machine (c) Mouse (d) Markup
  18. 18.🔍 One closing tag is missing. Which one?
    <h1>My pets
    <p>Good morning!</p>
    <strong>Fun facts</strong>
    (a) </strong> (b) </p> (c) </h2> (d) </h1>
  19. 19.🌐 Which one has an address bar? (a) a code editor (b) a web browser (c) a web server
  20. 20.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  21. 21.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  22. 22.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) element (d) address
  23. 23.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h2>? (a) <h5> (b) <h4> (c) <h2> (d) <h1>
  24. 24.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
  25. 25.🔍 Which line is missing its closing tag?
    line 1: <p>My best friend</p>
    line 2: <strong>Cricket is fun.
    line 3: <em>My pets</em>
    (a) line 1 (b) line 2 (c) line 3
  26. 26.Which of these is an empty tag? (a) <title> (b) <hr> (c) <ul> (d) <p>
  27. 27.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) index.html (c) All about me (d) Riya’s Recipes
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Rain today</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
  29. 29.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  30. 30.Which of these is true of a code editor? (a) has an address bar (b) is where we type code (c) answers page requests (d) opens web pages for us
  31. 31.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
    <p>Hello, world!</p>
  32. 32.📋 What number does the browser show next to “Grapes”?
    <ol start="9">
      <li>Papaya</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
  33. 33.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h5>? (a) <h5> (b) <h1> (c) <h2> (d) <h6>
  34. 34.True or false: in <img>, height sets how wide it is. (a) True (b) False
  35. 35.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Rivers flow<br>Birds sing<br>Sky is blue</p>
  36. 36.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h3>Fun facts</h3>
    <h2>Hello, world!</h2>
    <h2>Rain today</h2>
  37. 37.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Grapes</li>
    </ul>
  38. 38.🔗 Where does this link open?
    <a href="about.html">Visit the site</a>
    (a) in a new tab (b) in the same tab
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
  40. 40.🖼️ Which attribute of <img> describes the picture? (a) alt (b) height (c) src (d) width

Answer key

  1. False
  2. False
  3. Yes
  4. an attribute
  5. an opening tag
  6. <h2>
  7. an opening tag
  8. </li>
  9. numbers
  10. <a>
  11. shows line numbers
  12. <!--
  13. <ol>
  14. 5
  15. 2
  16. </h3>
  17. Markup
  18. </h1>
  19. a web browser
  20. No
  21. has a closing tag
  22. element
  23. <h1>
  24. -->
  25. line 2
  26. <hr>
  27. Riya’s Recipes
  28. 1
  29. Yes
  30. is where we type code
  31. 3
  32. 11
  33. <h6>
  34. False
  35. 5
  36. 4
  37. 4
  38. in the same tab
  39. 1
  40. alt

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