HTML 사전

tbody

설명

The HTML Table Body Element (<tbody>) defines a set of rows defining the body of the table. Though not mandatory, as the rows of the body can be defined as <tr> elements children of the parent <table> element, if present, all <tr> elements part of the body must be included into a unique <tbody> element.

<tbody> 엘리먼트는 테이블 본문에 들어가는 행들을 지정한다. 테이블 본문은 해당 <table>의 자식 엘리먼트인 <tr> 만을 이용해서도 적용가능하기때문에 <tbody>엘리먼트를 반드시 사용할 필요는 없다. 만약 사용한다면, 테이블 본문에 들어갈 <tr>태그는 반드시 <tbody> 엘리먼트에 자식 엘리먼트로 들어가야 한다.

Usage Context

Permitted content Zero or more <tr> elements.
Tag omission The start tag may be omitted, if it has a <tr> element as its first child and if it is not preceded by a <thead>, <tfoot> or <tbody> element whose end tag has been omitted.
The end tag may be omitted if the <tbody> element is immediately followed by a <tbody> or <tfoot> element, of if there is no more content in the parent <table> element.
Permitted parent elements  A <table> element. The <tbody> must appears after any <caption>, <colgroup> or <thead> element.
Normative document HTML5, section 4.9.5 (HTML4.01, section 11.2.3)

속성

이 엘리먼트는 전역속성을 지원한다.

 align - HTML 4.01에서 사용중지, HTML5에서 폐지

This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:

 • left, aligning the content to the left of the cell
 • center, centering the content in the cell
 • right, aligning the content to the right of the cell
 • justify, inserting spaces into the textual content so that the content is justified in the cell
 • char, aligning the textual content on a special character with a minimal offset, defined by the char and charoff attributes. (일단 넘어가고) 
 
If this attribute is not set, the left value is assumed.

이 속성은 각 셀안의 내용의 수평적인 정렬방식을 지정한다. 지정가능한 값은 아래와 같다.

  • left, 셀의 내용을 셀안에서 왼쪽에 정렬한다.
  • center, 셀의 내용을 셀안에서 중앙에 정렬한다.
  • right,  셀의 내용을 셀안에서 오른쪽에 정렬한다.
  • justify, 텍스트 안에 있는 공백문자를 조절해서 셀안에 넓이에 맞게 조절한다.
  • char, 

이 속성이 지정되지 않으면, 기본값은 left가 된다.

Note : Do not use this attribute as it is obsolete (not supported) in the latest standard.
 • To achieve the same effect as the left, center, right or justify values, use the CSS text-align property on it.
 • To achieve the same effect as the char value, in CSS3, you can use the value of the char as the value of the text-align property Unimplemented .

참고 : 이 속성은 최신 표준에 의하면 폐지되었으므로, 지원되지 않으니 사용하지 말자.
- left,center, right, justify 값의 효과를 내려면, CSS의 text-align 속성을 사용하자.
- char 값의 효과를 내려면, CSS3에서는 text-align 프로퍼티의 값을 char로 지정해주면 된다. (미구현)

 bgcolor - Non-standard

This attribute defines the background color of each cell of the column. It is one of the 6-digit hexadecimal code as defined in sRGB, prefixed by a '#'.

Usage note : Do not use this attribute, as it is non-standard and only implemented some versions of Microsoft Internet Explorer: the <tbody> element should be styled using CSS. To give a similar effect to the bgcolor attribute, use the CSS property background-color, on the relevant <td> or <th> elements.

bgcolor - 비-표준

이 속성은 테이블의 열 내의 각 셀의 색상을 지정한다. 속성값은 sRGB에서 정의된 6자리로된 16진법 코드이며, #로 시작한다.

사용시 참고 : 이 속성은 사용하지 말자. 비표준이며 인터넷 익스플로러의 버전 중의 몇 개에서만 구현되었기 때문이다. <tbody>요소의 모양을 바꿀 때에는 CSS를 사용하자. bgcolor 속성이 나타내는 모양을 나타내려면, <td>와 <th>요소에다가 CSS속성 background-color속성을 사용하자.

char - Deprecated in HTML 4.01, Obsolete in HTML5

This attribute is used to set the character to align the cells in a column on. Typical values for this include a period (.) when attempting to align numbers or monetary values. If align is not set to char, this attribute is ignored.

Note : Do not use this attribute as it is obsolete (and not supported) in the latest standard. To achieve the same effect as the char , in CSS3, you can use the character set using the char attribute as the value of the text-align property Unimplemented .

char - HTML 4.01부터 폐지예정, HTML5에서 폐지됨


숫자나 화폐를 정렬하려고 할 때에 이 속성값은 보통 마침표(.)를 포함한다. align속성값이 char로 지정되어 있지 않으면, char 속성은 무시된다.

참고 : 이 속성은 최신 버전에서는 폐지되었고 지원되지 않기 때문에 사용하지 말자. char와 같은 모양을 표현하려면 CSS3에서 character set을 사용하면 된다. 이 때 text-align 속성의 값으로 char 속성을 사용하면 된다. (미구현됨)

charoff - Deprecated in HTML 4.01, Obsolete in HTML5

This attribute is used to indicate the number of characters to offset the column data from the alignment characters specified by the char attribute.(패스..)

Note : Do not use this attribute as it is obsolete (and not supported) in the latest standard.

charoff - HTML 4.01에서 폐지예정됨, HTML5에서 폐지됨

일단 패스.

참고 : 최신 버전에서는 폐지되었고 지원되지 않으니 이 속성은 사용하지 말자.

valign - Deprecated in HTML 4.01, Obsolete in HTML5

This attribute specifies the vertical alignment of the text within each row of cells of the table header. Possible values for this attribute are:
 • baseline, which will put the text as close to the bottom of the cell as it is possible, but align it on the baseline of the characters instead of the bottom of them. If characters are all of the size, this has the same effect as bottom.
 • bottom, which will put the text as close to the bottom of the cell as it is possible;
 • middle, which will center the text in the cell;
 • and top, which will put the text as close to the top of the cell as it is possible.

Note : Do not use this attribute as it is obsolete (and not supported) in the latest standard: instead set the CSS  vertical-align property on it.

valign - HTML 4.01에서 폐지예정됨, HTML5에서 폐지됨

이 속성은 테이블의 header에 있는 셀 본문의 수평 정렬방식을 지정한다.이 속성의 값이 될 수 있는 것은 다음과 같다: 
- baseline : 본문은 셀의 바닥쪽에 표시한다. 최대한 셀의 바닥 쪽에 가깝게 본문을 위치시키지만, 문자의 bottom보다는 baseline에 맞추어 정렬시킨다. 문자의 크기가 모두 동일하다면, baseline은 bottom의 경우와 모양이 같다. 
- bottom :  최대한 셀의 바닥쪽에 본문을 표시한다.
- middle : 본문을 셀의 중간부에 위치시킨다.
- top : 본문을 셀의 위쪽에 위치시킨다. 

예제

Please see the <table> page for examples on <tbody>.

<table>요소의 예제를 참고하라.

DOM Interface

This element implements the HTMLTableSectionElement interface.

이 요소는 HTMLTableSectionElement 인터페이스를 구현하였다.

호환성

Desktop
기능 구글크롬 파이어폭스Gecko) 인터넷 익스플로러 Opera Safari
기본적인 지원 1.0 1.0 (1.7 or earlier) 지원 지원 지원
align/valign attribute 1.0 bug 915 지원 지원 지원
char/charoff attribute 1.0 bug 2212 지원 지원 지원
bgcolor attribute
Non-standard
    지원    
Mobile
기능 안드로이드 파이어폭스 모바일(Gecko) 인터넷 익스플로러 모바일 오페라 모바일 사파리 모바일
기본적인 지원 지원 1.0 (1.0) 지원 지원 지원
align/valign attribute   bug 915      
char/charoff attribute   bug 2212      
bgcolor attribute
Non-standard
    지원    

참고

댓글

댓글 본문
버전 관리
김나솔
현재 버전
선택 버전
graphittie 자세히 보기