Colspan
Colspan is an HTML table attribute that allows a single cell to span across multiple columns. It applies to table header cells (th) and table data cells (td). The attribute takes a positive integer value, with a default of 1, which means the cell occupies exactly one column.
When a cell uses colspan="n", it extends across n columns in that row. This changes the effective
Example: a header row might include a cell with colspan="2" to label two underlying columns. For instance,
Colspan often works in concert with rowspan, which spans cells vertically. Proper use requires careful planning