HTML <td> charoffAttribute

HTML td 标签参考手册HTML <td> Tag

Examples

Align the content of the "Savings" data cell two characters to the right of the "." character:

<table border="1">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td align="char" char="." charoff="2">$100.00</td>
</tr>
<tr>
<td>February</td>
<td align="char" char="." charoff="2">$10.00</td>
</tr>
</table>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Almost all mainstream browsers do not support the charoff attribute.


Definition and Usage

HTML5 does not support the <td> charoff attribute.

The charoff attribute sets the alignment offset of the content relative to the character specified by the char attribute.

The charoff attribute can only be used when the align attribute is set to "char" and the char attribute has been set.


Syntax

<td charoff="number">

Attribute Values

Value Description
number Specifies the alignment.
Positive numbers specify alignment to the right of the character.
Negative numbers specify alignment to the left of the character.


HTML td 标签参考手册HTML <td> Tag Other Extensions