Spanning Rows and Columns
Tables can have cells that span multiple rows or columns using colspan and rowspan attributes.
Column Spanning
Loading HTML Playground...
The colspan attribute:
- Merges cells horizontally
- Value is number of columns to span
Row Spanning
Loading HTML Playground...
The rowspan attribute:
- Merges cells vertically
- Value is number of rows to span
Combined Spanning
Loading HTML Playground...
Cells can span both rows and columns simultaneously.
Schedule Table Example
Loading HTML Playground...
Invoice Layout
Loading HTML Playground...
Planning Your Spans
Tips for complex tables:
- Draw the table on paper first
- Count columns carefully
- Note where spans begin
- Test in browser frequently
Loading HTML Playground...
Exercise: Create Spanning Table
Create a table with column and row spanning:
Loading HTML Exercise...
Spanning allows complex table layouts while maintaining semantic structure!

