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

HTML th align attribute

HTML align attribute

HTML th Tag Reference HTML Tag

Example

Left-align the content in a header cell:

 

   

   

 

 

   

   

 

Month Savings
January $100

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the align attribute.

**Note:** Almost no browsers can handle the "char" value correctly.


Definition and Usage

HTML5 does not support the align attribute. Please use CSS instead.

The align attribute specifies the horizontal alignment of the content in a header cell.


Syntax

Attribute values

Value Description
left Align content to the left.
right Align the content to the right.
center Center-align the content ( the default value).
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 th Tag Reference HTML tag