HTML th charoff Attribute
Learn not just technology, but also dreams!
HTML charoff Attribute
This attribute is used to specify the alignment offset relative to the character defined by the char attribute.
Note: The charoff attribute is not supported in HTML5 and has been deprecated in modern browsers.
Example
Align the content of the first table header cell with the "M" character positioned two characters to the right:
<table border="1">
<tr>
<th align="char" char="M" charoff="2">Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100.00</td>
</tr>
<tr>
<td>February</td>
<td>$10.00</td>
</tr>
</table>
Try it Yourself Β»
Browsers Support
Almost all mainstream browsers do not support the charoff attribute.
Definition and Usage
The charoff attribute is not supported in HTML5.
This attribute specifies the alignment offset 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 is also defined.
Syntax
<th charoff="number">
Attribute Values
Value
Description
number
Specifies the alignment offset.
Positive number
Aligns content to the right of the character.
Negative number
Aligns content to the left of the character.
This attribute is used to specify the alignment offset relative to the character defined by the char attribute.
Note: The charoff attribute is not supported in HTML5 and has been deprecated in modern browsers.
Example
Align the content of the first table header cell with the "M" character positioned two characters to the right:
<table border="1">
<tr>
<th align="char" char="M" charoff="2">Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100.00</td>
</tr>
<tr>
<td>February</td>
<td>$10.00</td>
</tr>
</table>
Try it Yourself Β»
Browsers Support
Almost all mainstream browsers do not support the charoff attribute.
Definition and Usage
The charoff attribute is not supported in HTML5.
This attribute specifies the alignment offset 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 is also defined.
Syntax
<th charoff="number">
Attribute Values
| Value | Description |
|---|---|
number |
Specifies the alignment offset. |
| Positive number | Aligns content to the right of the character. |
| Negative number | Aligns content to the left of the character. |
YouTip