char (HTML attribute)

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

Syntax

char="character"

Description

It may be useful in tables that contain financial information to align contents beyond the simple "left", "right", and "center" determinations. For example, you might align numerical data to a decimal point, or some other symbol. The char attribute allows you to define the character against which data is aligned, but this only works if the align attribute has also been set to "char".

Example

The column data below is set to align to the ":" and "%" characters in different colgroups:

<table border="1">
  <colgroup align="char" char=":">
    <col/>
    <col/>
  </colgroup>
  <colgroup align="char" char="%">
    <col/>
    <col/>
  </colgroup>
  ⋮
</table>

Value

This attribute takes as its value a single character that appears in the table; for example, a decimal point character.

Compatibility

Internet Explorer Firefox Safari Opera Chrome
5.5 6.0 7.0 8.0 1.0 1.5 2.0 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

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

User-contributed notes

There are no comments yet.

Related Products