English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

Complete List of HTML Tags

HTML: <colgroup> char attribute

HTML5 does not support the <colgroup> char attribute. The char attribute specifies the alignment of the content in the column group with the character. The char attribute can only be used when the align attribute is set to "char", and the default value of char is the decimal point character of the page language.

 HTML <colgroup> тег

Online Example

In the following example, the content of the second column in the table is aligned with the character ".":

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML <colgroup> char attribute usage - Basic Tutorial (oldtoolbag.com)</title>
<style>table, th, td {  border: 1px solid black;}</style>
</head>
<body>
<table style="width:100%">
  <colgroup align="left"></colgroup>
  <colgroup align="char" char="."></colgroup>
  <tr>
    <th>Месяц</th>
    <th>Сбережения</th>
  </tr>
  <tr>
    <td>Январь</td>
    <td>$100.00</td>
  </tr>
  <tr>
    <td>Февраль</td>
    <td>$10.00</td>
  </tr>
</table>
</body>
</html>
Проверьте ‹/›

Совместимость с браузерами

IEFirefoxOperaChromeSafari

Примечание:Почти все основные браузеры не поддерживают свойство char.

Определение и использование

В HTML5不支持 свойство char для тега <colgroup>.

Свойство char определяет способ выравнивания содержимого группы столбцов относительно символа.

Свойство char можно использовать только при установке свойства align в значение "char".

Значением по умолчанию для свойства char является символ десятичной точки языка страницы.

Синтаксис

<colgroup char="символ">

Значение свойства

ЗначениеОписание
символОпределяет символы для выравнивания содержимого.
 HTML <colgroup> тег