← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 247 · 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 <h1> headings should a page usually have? (a) 1 (b) 3 (c) 10 (d) 6
  2. 2.Which of these goes in the head? (a) <h1> (b) <p> (c) <img> (d) <meta charset="utf-8">
  3. 3.🔍 Which line is missing its closing tag?
    line 1: <p>My best friend
    line 2: <h3>Our school trip</h3>
    line 3: <small>I love mangoes.</small>
    (a) line 3 (b) line 1 (c) line 2
  4. 4.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>Hello, world!</p> -->
    <p>My best friend</p>
    (a) My best friend (b) Rain today (c) Hello, world!
  5. 5.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="400">
    (a) cake.jpg (b) dog.jpg (c) Map of India (d) map.png
  6. 6.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) body (c) Welcome! (d) Space Facts
  7. 7.Which of these is an opening tag? (a) </title> (b) </p> (c) <title> (d) </body>
  8. 8.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the head (d) the title
  9. 9.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <table> (d) <style>
  10. 10.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  11. 11.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  12. 12.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <p>Good morning!</p>
  13. 13.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
  14. 14.📝 What do we need to write HTML? (a) a paintbrush (b) a printer (c) a microphone (d) a plain text editor
  15. 15.True or false: HTML on its own cannot make a form. (a) False (b) True
  16. 16.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h4>? (a) <h5> (b) <h6> (c) <h2> (d) <h4>
  17. 17.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ol>
  18. 18.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h4> or <h1>? (a) <h3> (b) <h5> (c) <h1> (d) <h4>
  19. 19.Which of these has a closing tag? (a) <hr> (b) <img> (c) <p> (d) <br>
  20. 20.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <img> (d) <p>
  21. 21.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) height (d) src
  22. 22.Which of these goes in the body? (a) <style> (b) <meta charset="utf-8"> (c) <title> (d) <h1>
  23. 23.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
  24. 24.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) height (c) width (d) src
  25. 25.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  26. 26.🔗 Where does this link open?
    <a href="quiz.html">About us</a>
    (a) in a new tab (b) in the same tab
  27. 27.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
    <p>My pets</p>
    (a) I love mangoes. (b) My best friend (c) My pets
  28. 28.📋 Which list suits a shopping list in any order? (a) <ul> (b) <hr> (c) <ol> (d) <br>
  29. 29.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <p> (d) <title>
  30. 30.True or false: <li> is an empty tag. (a) True (b) False
  31. 31.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) src (d) alt
  32. 32.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h2>? (a) <h3> (b) <h2> (c) <h5> (d) <h6>
  33. 33.🔍 One closing tag is missing. Which one?
    <h3>Hello, world!
    <i>Our school trip</i>
    <em>Rain today</em>
    (a) </i> (b) </em> (c) </h2> (d) </h3>
  34. 34.🔍 One closing tag is missing. Which one?
    <small>The red kite
    <h3>Good morning!</h3>
    <em>Rain today</em>
    (a) </small> (b) </h3> (c) </em> (d) </h1>
  35. 35.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Guava</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
  36. 36.🔍 One closing tag is missing. Which one?
    <em>My pets
    <p>Good morning!</p>
    <u>My best friend</u>
    (a) </p> (b) </em> (c) </h3> (d) </u>
  37. 37.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Papaya</li>
    </ul>
  38. 38.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
  39. 39.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  40. 40.Which of these is a closing tag? (a) <li> (b) <b> (c) <body> (d) </li>

Answer key

  1. 1
  2. <meta charset="utf-8">
  3. line 1
  4. Hello, world!
  5. map.png
  6. Welcome!
  7. <title>
  8. the body
  9. <table>
  10. Yes
  11. has a closing tag
  12. 3
  13. <!--
  14. a plain text editor
  15. False
  16. <h2>
  17. 6
  18. <h1>
  19. <p>
  20. <a>
  21. height
  22. <h1>
  23. element
  24. alt
  25. a closing tag
  26. in the same tab
  27. My best friend
  28. <ul>
  29. <p>
  30. False
  31. alt
  32. <h2>
  33. </h3>
  34. </small>
  35. 4
  36. </em>
  37. 2
  38. an attribute
  39. Yes
  40. </li>

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