--- title: slug: Web/HTML/Element/thead translation_of: Web/HTML/Element/thead ---

개요

The HTML Table Head Element (<thead>) defines a set of rows defining the head of the columns of the table.

사용 문맥

콘텐츠 범주 None.
허용되는 콘텐츠 Zero or more {{ HTMLElement("tr") }} elements.
태그 생략 The start tag is mandatory. The end tag may be omitted if the {{ HTMLElement("thead") }} element is immediately followed by a {{ HTMLElement("tbody") }} or {{ HTMLElement("tfoot") }} element.
허용되는 부모 요소 A {{ HTMLElement("table") }} element. The {{ HTMLElement("thead") }} must appear after any {{ HTMLElement("caption") }} or {{ HTMLElement("colgroup") }} element, even implicitly defined, but before any {{ HTMLElement("tbody") }}, {{ HTMLElement("tfoot") }} and {{ HTMLElement("tr") }} element.
Normative document HTML5, section 4.9.6 (HTML4.01, section 11.2.3)

속성

This element includes the global attributes.

{{ htmlattrdef("align") }} {{ Deprecated_inline() }} in {{ HTMLVersionInline("4") }}, {{ obsolete_inline() }} in {{ HTMLVersionInline("5") }}
This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:

If this attribute is not set,  the left value is assumed.

참고: 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 {{ cssxref("text-align") }} property on it.
  • To achieve the same effect as the char value, in CSS3, you can use the value of the {{ htmlattrxref("char", "thead") }} as the value of the {{ cssxref("text-align") }} property {{ unimplemented_inline() }}.
{{ htmlattrdef("bgcolor") }} {{ Non-standard_inline() }}
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 '#'. One of the sixteen predefined color strings may be used:
  black = "#000000"   green = "#008000"
  silver = "#C0C0C0"   lime = "#00FF00"
  gray = "#808080"   olive = "#808000"
  white = "#FFFFFF"   yellow = "#FFFF00"
  maroon = "#800000"   navy = "#000080"
  red = "#FF0000"   blue = "#0000FF"
  purple = "#800080"   teal = "#008080"
  fuchsia = "#FF00FF"   aqua = "#00FFFF"
Usage note: Do not use this attribute, as it is non-standard and only implemented in some versions of Microsoft Internet Explorer: the {{ HTMLElement("thead") }} element should be styled using CSS. To give a similar effect to the bgcolor attribute, use the CSS property {{ cssxref("background-color") }}, on the relevant {{ HTMLElement("td") }} or {{ HTMLElement("th") }} elements.
{{ htmlattrdef("char") }} {{ Deprecated_inline() }} in {{ HTMLVersionInline("4") }}, {{ obsolete_inline() }} in {{ HTMLVersionInline("5") }}
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 {{ htmlattrxref("align", "tr") }} 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 {{ htmlattrxref("char", "thead") }}, in CSS3, you can use the character set using the {{ htmlattrxref("char", "thead") }} attribute as the value of the {{ cssxref("text-align") }} property {{ unimplemented_inline() }}.
{{ htmlattrdef("charoff") }} {{ Deprecated_inline() }} in {{ HTMLVersionInline("4") }}, {{ obsolete_inline() }} in {{ HTMLVersionInline("5") }}
This attribute is used to indicate the number of characters to offset the column data from the alignment characters specified by the char attribute.
참고: Do not use this attribute as it is obsolete (and not supported) in the latest standard.
{{ htmlattrdef("valign") }} {{ Deprecated_inline() }} in {{ HTMLVersionInline("4") }}, {{ obsolete_inline() }} in {{ HTMLVersionInline("5") }}
This attribute specifies the vertical alignment of the text within each row of cells of the table header. Possible values for this attribute are:
Note: Do not use this attribute as it is obsolete (and not supported) in the latest standard: instead set the CSS {{ cssxref("vertical-align") }} property on it.

DOM 인터페이스

This element implements the HTMLTableSectionElement interface.

예제

See {{ HTMLElement("table") }} for examples on <thead>.

브라우저 호환성

{{Compat("html.elements.thead")}}

같이 보기

{{HTMLRef}}