HTML Tutorial
Menu
HTML Forms
Menu
HTML Graphics
Menu
HTML Media
Menu
HTML API
Menu
HTML Table Colspan & Rowspan
HTML Table – Colspan
The colspan attribute is used to make a cell span over multiple columns:
Example
Cell that spans two columns
To make a cell span more than one column, use the colspan attribute.
Name
Age
Jill
Smith
43
Eve
Jackson
57
Output:
Cell that spans two columns
To make a cell span more than one column, use the colspan attribute.Name | Age | |
---|---|---|
Jill | Smith | 43 |
Eve | Jackson | 57 |
HTML Table – Rowspan
The rowspan attribute is used to make a cell span over multiple rows :
Example:
Cell that spans two rows
To make a cell span more than one row, use the rowspan attribute.
Name
Jill
Phone
555-1234
555-8745
Output:
Cell that spans two rows
To make a cell span more than one row, use the rowspan attribute.
Name | Jill |
---|---|
Phone | 555-1234 |
555-8745 |