CSS HTML

HTML Table ColSpan Examples3 min read

What is colspan?

Allows a single table cell to span the width of more than one cell or column.




Both colspan= and rowspan= are attributes of the two table-cell elements, <th> and <td>. They provide the same functionality as “merge cell” in spreadsheet programs like Excel.

You may also like: HTML Table Rowspan Examples

Example 1:

HTML Table ColSpan Example 1
HTML Table ColSpan Example 1

Code:

Example 2:

HTML Table ColSpan Example 2
HTML Table ColSpan Example 2

Code:

Example 3: HTML ColSpan with RowSpan

HTML Table ColSpan Example 3
HTML Table ColSpan Example 3

Code:

1 Comment

Leave a Comment