Answer: The <colspan> tag inside a <th> or <td> tag is used to span the columns.
Let us see an example.
Example:
<html>
<body>
<h4>Cell that spans two columns:</h4>
<table border="1">
<tr>
<th>Name</th>
<th colspan="2">Telephone</th>
</tr>
<tr>
<td>Charles Babbage</td>
<td>555 89 123</td>
<td>555 98 321</td>
</tr>
</table>
</body>
</html>
|
Alert Moderator