English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The <th> charoff attribute sets the number of characters to align the content with the character specified by the char attribute. The charoff attribute can only be used when the char attribute is specified and the align attribute is set to 'char'.
Align the content of the first table header cell with the two characters to the right of the 'Y' character:
<table style="width:100%" border="1"> <tr> <th align="char" char="Y" charoff="2">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 and see ‹/›
IEFirefoxOperaChromeSafari
Almost all mainstream browsers do not support the charoff attribute.
HTML5 The <th> charoff attribute is not supported.
The charoff attribute sets the number of characters to align the content with the character specified by the char attribute.
The charoff attribute can only be used when the char attribute is specified and the align attribute is set to 'char'.
<th charoff="number">
Value | Description |
---|---|
number | Specify the alignment method. Positive numbers specify right alignment for the character. Negative numbers specify left alignment for the character. |