← Tables lesson New set →

HTML Worksheet: Tables

HTML and CSS lesson 22: Tables · Set 42 · 40 questions
TalentJR

Code tip (Rows hold cells): <table> holds rows <tr>; each row holds cells <td> (data) or <th> (heading). Rows = number of <tr>; cells in a row = <td> + <th> in it. Total cells = rows × cells per row.

NameDateTime takenScore ___ / 40
  1. 1.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Litchi</td><td>Mango</td><td>Grapes</td></tr>
      <tr><td>Litchi</td><td>Mango</td><td>Papaya</td></tr>
      <tr><td>Banana</td><td>Jamun</td><td>Guava</td></tr>
    </table>
  2. 2.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Grapes</td><td>Litchi</td></tr>
    </table>
  3. 3.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
  4. 4.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Jamun</td><td>Mango</td></tr>
      <tr><td>Banana</td><td>Grapes</td></tr>
      <tr><td>Banana</td><td>Litchi</td></tr>
    </table>
  5. 5.True or false: <th> makes one table row. (a) True (b) False
  6. 6.📊 Which tag makes one table row? (a) <tr> (b) <table> (c) <th> (d) <caption>
  7. 7.📊 How many cells does this table have in all?
    <table>
      <tr><td>Litchi</td><td>Litchi</td><td>Papaya</td></tr>
      <tr><td>Litchi</td><td>Grapes</td><td>Litchi</td></tr>
      <tr><td>Papaya</td><td>Jamun</td><td>Jamun</td></tr>
      <tr><td>Orange</td><td>Papaya</td><td>Banana</td></tr>
    </table>
  8. 8.📊 Which tag holds the whole table? (a) <tr> (b) <th> (c) <table> (d) <td>
  9. 9.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Jamun</td><td>Guava</td><td>Litchi</td></tr>
      <tr><td>Jamun</td><td>Banana</td><td>Guava</td></tr>
      <tr><td>Guava</td><td>Banana</td><td>Banana</td></tr>
    </table>
  10. 10.True or false: <caption> gives the table a title. (a) True (b) False
  11. 11.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Orange</td><td>Grapes</td><td>Banana</td><td>Orange</td></tr>
    </table>
  12. 12.True or false: <tr> makes one table row. (a) False (b) True
  13. 13.📊 How many rows does this table have?
    <table>
      <tr><td>Orange</td><td>Grapes</td><td>Mango</td><td>Banana</td></tr>
      <tr><td>Banana</td><td>Litchi</td><td>Jamun</td><td>Litchi</td></tr>
    </table>
  14. 14.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Papaya</td><td>Mango</td><td>Orange</td><td>Orange</td></tr>
      <tr><td>Jamun</td><td>Litchi</td><td>Papaya</td><td>Grapes</td></tr>
      <tr><td>Mango</td><td>Orange</td><td>Orange</td><td>Jamun</td></tr>
    </table>
  15. 15.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Banana</td><td>Papaya</td><td>Litchi</td><td>Jamun</td></tr>
    </table>
  16. 16.📊 Which tag makes one data cell? (a) <tr> (b) <caption> (c) <td> (d) <th>
  17. 17.📊 How many rows does this table have?
    <table>
      <tr><td>Orange</td><td>Banana</td><td>Papaya</td></tr>
      <tr><td>Papaya</td><td>Orange</td><td>Grapes</td></tr>
      <tr><td>Banana</td><td>Guava</td><td>Litchi</td></tr>
      <tr><td>Jamun</td><td>Guava</td><td>Grapes</td></tr>
    </table>
  18. 18.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Litchi</td><td>Banana</td></tr>
      <tr><td>Grapes</td><td>Papaya</td></tr>
    </table>
  19. 19.📊 How many cells does this table have in all?
    <table>
      <tr><td>Mango</td><td>Orange</td></tr>
      <tr><td>Orange</td><td>Litchi</td></tr>
      <tr><td>Grapes</td><td>Guava</td></tr>
      <tr><td>Mango</td><td>Guava</td></tr>
    </table>
  20. 20.True or false: <caption> makes one table row. (a) False (b) True
  21. 21.📊 Which tag makes a heading cell? (a) <th> (b) <table> (c) <tr> (d) <caption>
  22. 22.True or false: <table> holds the whole table. (a) False (b) True
  23. 23.True or false: <caption> holds the whole table. (a) False (b) True
  24. 24.📊 Where do <td> cells go? (a) inside a <li> (b) inside a <p> (c) inside a <tr> (d) inside the <head>
  25. 25.📊 In a table, which tag is a row? (a) <td> (b) <tb> (c) <th> (d) <tr>
  26. 26.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Jamun</td><td>Grapes</td><td>Grapes</td></tr>
    </table>
  27. 27.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Jamun</td><td>Papaya</td><td>Banana</td><td>Orange</td></tr>
      <tr><td>Grapes</td><td>Jamun</td><td>Litchi</td><td>Orange</td></tr>
      <tr><td>Papaya</td><td>Guava</td><td>Papaya</td><td>Mango</td></tr>
    </table>
  28. 28.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Guava</td><td>Grapes</td><td>Guava</td><td>Grapes</td></tr>
    </table>
  29. 29.📊 How many rows does this table have?
    <table>
      <tr><td>Grapes</td><td>Grapes</td><td>Grapes</td><td>Guava</td></tr>
      <tr><td>Mango</td><td>Orange</td><td>Litchi</td><td>Mango</td></tr>
      <tr><td>Grapes</td><td>Guava</td><td>Jamun</td><td>Litchi</td></tr>
      <tr><td>Jamun</td><td>Mango</td><td>Banana</td><td>Orange</td></tr>
    </table>
  30. 30.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Mango</td><td>Jamun</td><td>Orange</td><td>Litchi</td></tr>
    </table>
  31. 31.📊 How many rows does this table have?
    <table>
      <tr><td>Litchi</td><td>Mango</td><td>Jamun</td></tr>
      <tr><td>Guava</td><td>Mango</td><td>Grapes</td></tr>
      <tr><td>Orange</td><td>Mango</td><td>Litchi</td></tr>
      <tr><td>Banana</td><td>Orange</td><td>Papaya</td></tr>
    </table>
  32. 32.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Litchi</td><td>Guava</td><td>Mango</td></tr>
      <tr><td>Grapes</td><td>Banana</td><td>Jamun</td></tr>
      <tr><td>Guava</td><td>Mango</td><td>Guava</td></tr>
    </table>
  33. 33.📊 How many rows does this table have?
    <table>
      <tr><td>Papaya</td><td>Banana</td><td>Jamun</td><td>Mango</td></tr>
      <tr><td>Banana</td><td>Guava</td><td>Banana</td><td>Papaya</td></tr>
    </table>
  34. 34.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Mango</td><td>Guava</td><td>Mango</td></tr>
    </table>
  35. 35.📊 How many cells does this table have in all?
    <table>
      <tr><td>Banana</td><td>Guava</td></tr>
      <tr><td>Mango</td><td>Litchi</td></tr>
      <tr><td>Grapes</td><td>Guava</td></tr>
      <tr><td>Mango</td><td>Grapes</td></tr>
    </table>
  36. 36.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Litchi</td><td>Grapes</td><td>Mango</td></tr>
      <tr><td>Grapes</td><td>Papaya</td><td>Guava</td></tr>
      <tr><td>Jamun</td><td>Jamun</td><td>Papaya</td></tr>
    </table>
  37. 37.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Jamun</td><td>Guava</td></tr>
    </table>
  38. 38.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Guava</td><td>Orange</td><td>Litchi</td></tr>
    </table>
  39. 39.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Guava</td><td>Litchi</td></tr>
    </table>
  40. 40.True or false: <tr> holds the whole table. (a) True (b) False

Answer key

  1. 3
  2. 2
  3. Yes
  4. 2
  5. False
  6. <tr>
  7. 12
  8. <table>
  9. 3
  10. True
  11. 4
  12. True
  13. 2
  14. 4
  15. 8
  16. <td>
  17. 4
  18. 2
  19. 8
  20. False
  21. <th>
  22. True
  23. False
  24. inside a <tr>
  25. <tr>
  26. 6
  27. 4
  28. 4
  29. 4
  30. 4
  31. 4
  32. 12
  33. 2
  34. 3
  35. 8
  36. 12
  37. 2
  38. 2
  39. 2
  40. False

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