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

HTML colgroup align attribute

HTML align attribute

HTML colgroup Tag Reference HTML Tag

Example

Two elements specify different alignments for three columns in the table (note that the first element spans two columns):

 

 

 

   

   

   

 

 

   

   

   

 

ISBN Title Price
3476896 My first HTML $53

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Only Opera and Internet Explorer 8 and earlier versions (IE 9 does not support it) support the align attribute (IE 9 does not support it).


Definition and Usage

In HTML5, the align attribute is not supported.

The align attribute specifies the horizontal alignment of the content in the column group.


Syntax

Attribute values

Value Description
left Align the content to the left (default).
right Align the content to the right.
center Align the content to the center (the default for the th element).
justify Stretch the lines so that each line has an equal width (as in newspapers and magazines).
char Align the content to a specified character.

HTML colgroup Tag Reference HTML tag