Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML colgroup span attribute

HTML span attribute

HTML colgroup Tag Reference HTML Tag

Example

Use the span attribute to set the background color of the first two columns:

 

 

   

   

   

 

 

   

   

   

 

 

   

   

   

 

ISBN Title Price
3476896 My first HTML $53
5869207 My first CSS $49

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the span attribute.


Definition and Usage

The span attribute defines the number of columns the element should span.

**Tip:** To define different attributes for the columns within a colgroup, use the col element inside the colgroup tag tag.


Differences between HTML 4.01 and HTML5

none.


Syntax

HTML tag