English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
A propriedade charoff do elemento <th> define o número de caracteres com que o conteúdo deve ser alinhado em relação ao caractere especificado pela propriedade char. A propriedade charoff pode ser usada apenas quando a propriedade char está especificada e a propriedade align está configurada como "char".
Alinhe o conteúdo da primeira célula de cabeçalho com os dois caracteres à direita do caractere "Y":
<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 align the character to the right. Negative numbers align the character to the left. |