![]() |
VOOZH | about |
The colspan attribute in HTML is used in table cells (<td> or <th>) to span a cell across multiple columns. It helps in merging columns to create flexible table layouts.
Note: colspan="0" spans all remaining columns, but is not reliably supported in HTML5; use a positive integer value instead.
<td colspan = "value">table content...</td>The colspan attribute, when used with the <td> tag, specifies the number of columns a table cell should span.
<td colspan="value">Table content...</td>Example: Implementation of colspan attribute with td attribute with an example.
The colspan attribute, when used with the <th> tag, specifies the number of columns a header cell should span.
Syntax:
<th colspan="value">Table content...</th>Example: The implementation of rowspan attribute with th attribute with an example.