English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML td charoff-Eigenschaft

Dieser Artikel beschreibt die Verwendung der HTML td charoff-Eigenschaft, zeigt Beispiele zur Anwendung der HTML td charoff-Eigenschaft, die Kompatibilität der Browser, die Syntaxdefinition und detaillierte Informationen zu seinen Eigenschaftswerten.

 HTML <td> Tag

Online-Beispiel

Richten Sie den Inhalt des Datenfelds "Preis" um zwei Zeichen nach rechts aus, indem Sie das Zeichenset "." verwenden:

<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 See ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

Almost all mainstream browsers do not support the charoff attribute.

Definition and Usage

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'.

Syntax

<td charoff="number">

Attribute Value

ValueDescription
numberSpecify the alignment method.
Positive numbers specify right alignment of the character.
Negative numbers specify left alignment of the character.
 HTML <td> Tag