THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML <col> char Attribute

❮ HTML <col> tag

Example

In the example below, the content of the second column should be aligned to the "." character:

<table style="width:100%">
  <col align="left">
  <col align="char" char=".">
  <tr>
    <th>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 »

Definition and Usage

The <col> char attribute is not supported in HTML5.

The char attribute specifies the alignment of the content related to a <col> element, to a character.

The char attribute can only be used if the align attribute is set to "char".

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


Browser Support

Attribute
char Not supported Not supported Not supported Not supported Not supported

Syntax

<col char="character">

Attribute Values

Value Description
character Specifies the character to align the content to

❮ HTML <col> tag