HTML Attributes

HTML span attribute

Specifies how many columns a col or applicable colgroup represents. The default is 1; colgroup with span must not also contain col children. Applicable elements include: <col>, <colgroup>. Check each element’s value rules.

Formal Syntax & Structure

html syntaxhtml
span="2"

Parameters & Attributes

NameTypeDescription
spanpositive integerSpecifies how many columns a col or applicable colgroup represents. The default is 1; colgroup with span must not also contain col children.

Working Example

Example Snippethtml
<table>  <colgroup span="2"></colgroup>  <tr>    <td>A</td>    <td>B</td>  </tr></table>
HTML Reference