HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML <colgroup> char Attribute

HTML colgroup Tag Reference HTML <colgroup> tag

Example

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

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

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

Note: The char attribute is not supported by any of the major browsers.


Definition and Usage

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

The char attribute specifies the alignment of the content in a column group 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.


Syntax

<colgroup char="character">

Attribute Values

Value Description
character Specifies the character to align the content to


HTML colgroup Tag Reference HTML <colgroup> tag

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE