← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 957 · 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 paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>Fun facts</h2>
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
  2. 2.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ul>
    (a) numbers (b) bullets
  3. 3.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h4> or <h2>? (a) <h6> (b) <h2> (c) <h4> (d) <h5>
  4. 4.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <em>Our school trip</em>
    line 2: <h2>Good morning!
    line 3: <h1>The red kite</h1>
    (a) line 2 (b) line 3 (c) line 1
  6. 6.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h1> or <h5>? (a) <h5> (b) <h6> (c) <h1> (d) <h2>
  7. 7.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
  8. 8.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
    (a) My pets (b) The red kite (c) My best friend
  9. 9.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h3>I love mangoes.</h3>
    <p>Cricket is fun.</p>
  10. 10.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  11. 11.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  12. 12.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  13. 13.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  14. 14.🔍 Which line is missing its closing tag?
    line 1: <i>My best friend</i>
    line 2: <em>Cricket is fun.</em>
    line 3: <h3>The red kite
    (a) line 2 (b) line 3 (c) line 1
  15. 15.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
    (a) numbers (b) bullets
  16. 16.💬 Does the browser show comments on the page? (a) Yes (b) No
  17. 17.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
    <p>My best friend</p>
    (a) My best friend (b) Rain today (c) Good morning!
  18. 18.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h3>I love mangoes.</h3>
    <p>Our school trip</p>
    <h2>I love mangoes.</h2>
  19. 19.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
  21. 21.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) All about me (c) My Hobbies (d) index.html
  22. 22.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  23. 23.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  24. 24.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
  25. 25.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ul>
  26. 26.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Kites fly high<br>Sky is blue<br>Stars shine<br>Birds sing</p>
  27. 27.💬 How does an HTML comment end? (a) --> (b) >> (c) // (d) */
  28. 28.Which of these is true of a web browser? (a) stores a website’s files (b) has an address bar (c) hosts websites online (d) colours code to help us
  29. 29.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
  30. 30.🖼️ Which attribute of <img> names the picture file? (a) src (b) alt (c) width (d) height
  31. 31.🔗 Where does this link open?
    <a href="https://example.com">Play games</a>
    (a) in the same tab (b) in a new tab
  32. 32.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) { (d) <
  33. 33.📋 What number does the browser show next to “Banana”?
    <ol start="6">
      <li>Grapes</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>
  34. 34.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
  35. 35.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>Our school trip</h2>
    <p>The red kite</p>
    <h2>Our school trip</h2>
    <h2>Good morning!</h2>
    <p>I love mangoes.</p>
  36. 36.🏷️ Which is the closing tag for <p>? (a) <\p> (b) </p> (c) <p/> (d) <p>
  37. 37.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>I love mangoes.</p>
    <h2>My best friend</h2>
    <p>Hello, world!</p>
    <h2>Rain today</h2>
  38. 38.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) src (d) alt
  39. 39.Which of these is true of a code editor? (a) hosts websites online (b) has an address bar (c) shows line numbers (d) stores a website’s files
  40. 40.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt

Answer key

  1. 4
  2. bullets
  3. <h6>
  4. an opening tag
  5. line 2
  6. <h6>
  7. <h1>
  8. The red kite
  9. 2
  10. Yes
  11. No
  12. has a closing tag
  13. True
  14. line 3
  15. numbers
  16. No
  17. Good morning!
  18. 3
  19. in a new tab
  20. 2
  21. My Hobbies
  22. in the head
  23. 2
  24. <img>
  25. 3
  26. 5
  27. -->
  28. has an address bar
  29. False
  30. src
  31. in the same tab
  32. <
  33. 11
  34. <ol>
  35. 3
  36. </p>
  37. 3
  38. alt
  39. shows line numbers
  40. href

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