HTML <colgroup> char Attribute
β Learning not just technology, but also dreams!
Example
In the following example, the content of the second column in the table is aligned with the character ".":
<table width="100%" border="1">
<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>
Browsers Support
Note: Almost all major browsers do not support the char attribute.
Definition and Usage
In HTML5, the <colgroup> char attribute is not supported.
The char attribute specifies the alignment of content within a column group relative to a specific character.
The char attribute can only be used when the align attribute is set to "char".
The default value of the char attribute is the decimal point character of the page language.
Syntax
<colgroup char="character">
Attribute Values
| Value | Description |
|---|---|
character |
Specifies the character to which the content should be aligned. |
Coding Plans
ByteArk Coding Plan
Supports mainstream large models including Doubao, GLM, DeepSeek, Kimi, MiniMax β official supply, stable and reliable.
Β₯9.9 / month
Subscribe NowXunfei Star Coding Plan
Includes free model call credits β supports DeepSeek, GLM, Kimi, MiniMax. A one-stop platform for experience and deployment.
Β₯3.9 / month
Subscribe Now
YouTip