charoff (HTML attribute)

Spec
Depr. Version
No HTML 4
Browser support (more…)
IE8 FF3.5 SA4 OP10 CH2
None None None None None

Syntax

charoff="number"

Description

If the align attribute is set to "char", and the char attribute has been set to a character—thus telling the browser that cell contents should be aligned to a given character—the charoff attribute is used to set a character offset. If a charoff figure of "2" is chosen, as shown in the example HTML, the browser should align the cell contents two characters to the right of the specified character. If charoff were a negative value, for example "-2", the alignment should be offset two characters to the left of the specified character. Note that there are a few uses of the word “should” in this paragraph, which should (there we go again) give you a hint about what to expect in the Compatibility section for this attribute!

Example

Here, the character alignment offset is set to "2" characters:

<table summary="Interest Rates" width="400" border="1">
  <caption>Interest Rates</caption>
  <thead>
    <tr>
      <th>Account Type</th>
      <th>Interest Rate (%)</th>
    </tr>
  </thead>
  <tbody align="char" char="%" charoff="2">
    <tr>
      <td>Smart</td>
      <td>From 2%</td>
    </tr>
    <tr>
      <td>Young Saver</td>
      <td>From 1.6%</td>
    </tr>
  </tbody>
</table>

Value

This attribute takes an integer value, which can be positive or negative.

Compatibility

Internet Explorer Firefox Safari Opera Chrome
5.5 6.0 7.0 8.0 1.0 1.5 2.0 3.0 3.5 1.3 2.0 3.1 4.0 9.2 9.5 10.0 2.0
None None None None None None None None None None None None None None None None None

This attribute is poorly supported and should not be relied upon.

User-contributed notes

There are no comments yet.

Related Products