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

HTML 참고 매뉴얼

HTML 태그 전체 목록

HTML: <colgroup> char 속성

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

 HTML <colgroup> 태그

온라인 예제

아래 예제에서 테이블의 두 번째 열의 내용은 문자 "."과 정렬됩니다:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML <colgroup> char 속성 사용-기본 튜토리얼(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>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>
</body>
</html>
테스트를 해보세요 ‹/›

브라우저 호환성

IEFirefoxOperaChromeSafari

주의:대부분의 주요 브라우저는 char 속성을 지원하지 않습니다.

정의 및 사용법

HTML에서5 중에서 <colgroup> char 속성은 지원되지 않습니다.

char 속성은 열 그룹 내의 내용이 특정 문자에 대한 정렬 방식을 정의합니다.

align 속성이 "char"로 설정되었을 때만 char 속성을 사용할 수 있습니다.

char 속성의 기본 값은 페이지 언어의 소수점 문자입니다.

문법

<colgroup char="character">

속성 값

설명
character내용이 어떻게 정렬될지 정의합니다.
 HTML <colgroup> 태그