English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The 'char' attribute specifies the alignment of the content within the header cell with characters, and it can only be used when the 'align' attribute is set to 'char'. The default value of 'char' is the decimal point character of the page language.
Align the content of the first header cell with the character "Y":
<table style="width:100%" border="1"> <tr> <th align="char" char="Y">Year</th> <th>Income</th> </tr> <tr> <td>2018</td> <td>$15320.00</td> </tr> <tr> <td>2019</td> <td>$18320.00</td> </tr> </table>Test it out ‹/›
IEFirefoxOperaChromeSafari
Almost all mainstream browsers do not support the char attribute.
HTML5 The <th> char attribute is not supported.
The char attribute specifies the alignment of the content within the header cell with the character.
The char attribute can only be used when the align attribute is set to 'char'.
The default value of char is the decimal point character of the page language.
<th char="character">
Value | Description |
---|---|
character | Specifies the character to align the content with. |