The colspan attribute
The colspan
attribute stands for column spanning, which allows you to extend a column across multiple other columns. Add the attribute to the tag of the cell you want to expand, and set the value to the number of columns you want to be fused.
To merge two columns into one header in the above example, we use the table header tag <th>
with the attribute colspan
and the value 2
.