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

HTML th colspan attribute

HTML colspan attribute

HTML th Tag Reference HTML Tag

Example

The following HTML table contains a header cell that spans two columns:

 

   

 

 

   

   

 

 

   

   

 

Monthly Savings
January $100
February $80

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the colspan attribute.

**Note:** Only Firefox supports colspan="0", which has a special meaning (see the "attribute value" table below).


Definition and Usage

The colspan attribute defines the number of columns a header cell should span.


Differences between HTML 4.01 and HTML5

none.


Syntax

HTML tag