English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag Directory

HTML: <th> char attribute

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.

 HTML <th> tag

Online Example

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 ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

Almost all mainstream browsers do not support the char attribute.

Definition and Usage

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.

Syntax

<th char="character">

Attribute value

ValueDescription
characterSpecifies the character to align the content with.
 HTML <th> tag