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
tableelement. - A table row is created with the
trelement (table row), which is a child of thetableelement. - A cell with data is created with the
tdelement (table data), which is a child of thetrelement. - A column is made up of the cells at the same position in each row.
- A heading cell is created with the
thelement (table header), which is also a child of thetrelement. - The
colspanattribute sets how many columns a cell spans. - The
rowspanattribute 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
7/7