English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This article introduces the usage of the HTML td charoff attribute, with online examples demonstrating how to use the HTML td charoff attribute, browser compatibility, syntax definition, and detailed information about its attribute values.
Align the content of the "Price" data unit to the right by two characters relative to "."
<table style="width:100%;" border="1"> <thead> <tr> <th>Course</th> <th>Price</th> </tr> </thead> <tbody> <tr> <td>PHP Basic Course</td> <td align="char" char="." charoff="2">450.00</td> </tr> <tr> <td>JAVA Programming Course</td> <td align="char" char="." charoff="2">880.00</td> </tr> </tbody> </table>Test and see ‹/›
IEFirefoxOperaChromeSafari
Almost all mainstream browsers do not support the charoff attribute.
HTML5 The <td> 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'.
<td 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. |