HTML Tables Colspan & Rowspan
The `colspan` and `rowspan` attributes are used to span cells across columns and rows respectively. Tailwind CSS provides utilities to style these tables. Below are examples showcasing different uses of these attributes.
Table with Colspan
| Header 1 | Header 2 | Header 3 | Header 4 |
|---|---|---|---|
| Data 1-2 (colspan=2) | Data 3 | Data 4 | |
| Data 5 | Data 6 | Data 7-8 (colspan=2) | |
Table with Rowspan
| Header 1 | Header 2 | Header 3 |
|---|---|---|
| Data 1-2 (rowspan=2) | Data 2 | Data 3 |
| Data 4 | Data 5 | |
| Data 6 | Data 7 |
Table with Both Colspan and Rowspan
| Header 1 | Header 2 | Header 3 | Header 4 |
|---|---|---|---|
| Data 1-2 (rowspan=2, colspan=2) | Data 3 | Data 4 | |
| Data 5 | Data 6 | ||
| Data 7 | Data 8 | Data 9 | Data 10 |