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

HTML Reference Manual

HTML Tag Directory

HTML: <th> charoff attribute

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'.

 HTML <th> tag

Online Example

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

Browser Compatibility

IEFirefoxOperaChromeSafari

Almost all mainstream browsers do not support the charoff attribute.

Definition and Usage

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'.

Syntax

<th charoff="number">

Attribute Value

ValueDescription
numberSpecify the alignment method.
Positive numbers specify right alignment for the character.
Negative numbers specify left alignment for the character.
 HTML <th> tag