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

HTML reference manual

HTML tag大全

HTML td char attribute

The char attribute specifies the alignment of the content within a cell with characters, and can only be used when the align attribute is set to 'char'.

 HTML <td> tag

Online example

Align the content of the 'price' data unit with the '.' character:

<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=".">450.00</td>
    </tr>
    <tr>
      <td>JAVA Programming Course</td>
      <td align="char" char=".">880.00</td>
    </tr>
  </tbody>
</table>
Test and see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

Almost all mainstream browsers do not support the char attribute.

Definition and Usage

HTML5 The <td> char attribute is not supported.

The char attribute specifies the alignment of the content within the cell with the character.

The char attribute can only be used when the align attribute is set to 'char'.

The default value of char is the decimal point character of the page language.

Syntax

<td char="character">

Attribute Value

ValueDescription
characterSpecifies the character to align the content with.
 HTML <td> tag