WE BELIEVE IN QUALITY SERVICE

colspan Attribute

colspan attribute defines the number of columns of a table cell should span. colspan attribute is used to divide a cell more than one column. It can be used with <td> and <th> tag.

Example:

<table>
<tr>
<th> Name: </th>
<th colspan="2"> Hobbies: </th>
</tr>
<tr>
<td> Jason Statham </td>
<td> Travelling </td>
<td> Gardening </td>
</tr>
</table>

Run Example

Browser Support

Attribute Firefox Chrome IE Opera Safari
colspan yes yes yes yes yes