Latest web development tutorials

HTML col charoff property

HTML col tag Reference Manual HTML <col> tag

Examples

. "" In the following HTML table, the second column of the content and character to the right-aligned position of the two characters:

<table width="100%" border="1">
<col align="left">
<col align="char" char="." charoff="2">
<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"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Note: All major browsers do not support charoff property.


Definition and Usage

HTML5 is no longer supported <col> charoff property.

charoff attribute specifies the alignment of the content relative to the offset specified by the char attribute characters.

Only when the align attribute set to "char" char property and set to use charoff property.


grammar

<col charoff="number">

Property Value

描述
number 规定对齐方式。
正数规定向字符的右边对齐。
负数规定向字符的左边对齐。


HTML col tag Reference Manual HTML <col> tag