Tables in an HTML Page
Surround the entire table with a pair of TABLE tags.
Within the table, surround each row with a pair of TR tags.
Within each row, surround each item of data with a pair of TD tags.
Before the first row and/or at the start of each row,
surround each table header with a pair of TH tags.
|
Column 1 |
Column 2 |
Row 1 |
row 1, col 1 |
row 1, col 2 |
Row 2 |
row 2, col 1 |
row 2, col 2 |
The rowspan and colspan attributes
|
Column 1 |
Column 2 |
Column 3 |
Row 1 |
row 1, col 1 |
Spans 2 columns |
Row 2 |
Spans 2 rows |
row 2, col 2 |
row 2, col 3 |
Row 3 |
row 3, col 2 |
row 3, col 3 |
The style attribute
|
Column 1 |
Column 2 |
Row 1 |
row 1, col 1 |
row 1, col 2 |
Row 2 |
row 2, col 1 |
row 2, col 2 |