Table Summary

In the fourth lesson, we learned everything we need to create tables in HTML and found out that:

  • Tables are created with the table element.
  • A table row is created with the tr element (table row), which is a child of the table element.
  • A cell with data is created with the td element (table data), which is a child of the tr element.
  • A column is made up of the cells at the same position in each row.
  • A heading cell is created with the th element (table header), which is also a child of the tr element.
  • The colspan attribute sets how many columns a cell spans.
  • The rowspan attribute sets how many rows a cell spans. The rows below then have one cell fewer, because the cell takes up their place.

In the next lesson, we'll look at HTML forms: why we need them, how to create them and more!

Instructions

Congratulations on completing the fourth lesson! Your final code from this lesson is in the editor. Now you can customize the table with your newly acquired knowledge, for example by adding another day of measurements.

Start programming for free

By signing up, you agree to the Terms of Service and Privacy Policy.

Or sign up with:

7/7