HTML span Attribute
Example
<table>
<colgroup>
<col style="background-color:red">
<col span="2" style="background-color:yellow">
</colgroup>
<tr>
<th>No</th>
<th>First Name</th>
<th>Last Name</th>
</tr>
<tr>
<td>01</td>
<td>John</td>
<td>Doe</td>
</tr>
<tr>
<td>02</td>
<td>Michael</td>
<td>Jackson</td>
</tr>
</table>
Meaning
Specifies the number of columns a <col>/<colgroup> element should span. (default value is 1)
Standard Syntax
<element span="number">
Browser Support
Status
Applies to:
The span attribute can be used on the following element:
Element | Attribute |
---|---|
<col> | span |
<colgroup> | span |
Attribute Values
Value | Description |
---|---|
number | Specifies the number of columns should span.(default value is 1) |