--- title:
The HTML Table Row Element (<tr>
) defines a row of cells in a table. Those can be a mix of {{HTMLElement("td")}} and {{HTMLElement("th")}} elements.
콘텐츠 범주 | None. |
허용되는 콘텐츠 | Zero or more {{HTMLElement("td")}} or {{HTMLElement("th")}} elements, or a mix of them |
태그 생략 | The start tag is mandatory. The end tag may be omitted if the {{HTMLElement("tr")}} element is immediately followed by a {{HTMLElement("tr")}} element, or if the parent table group ({{HTMLElement("thead")}}, {{HTMLElement("tbody")}} or {{HTMLElement("tfoot")}}) element doesn't have any more content. |
허용되는 부모 요소 | A {{HTMLElement("table")}}, {{HTMLElement("thead")}}, {{HTMLElement("tbody")}} or {{HTMLElement("tfoot")}} element. |
Normative document | HTML, "The tr element" |
This element includes the global attributes.
left
, aligning the content to the left of the cellscenter
, centering the content in the cellsright
, aligning the content to the right of the cellsjustify
, widening the spaces in the textual content so that the content is justified in the cellschar
, aligning the textual content on a special character with a minimal offset, defined by the {{htmlattrxref("char", "tr")}} and {{htmlattrxref("charoff", "tr")}} attributes {{unimplemented_inline("2212")}}.If this attribute is not set, the parent node's value is inherited.
left
, center
, right
or justify
values, use the CSS {{cssxref("text-align")}} property on it.char
value, in CSS3, you can use the value of the {{htmlattrxref("char", "tr")}} as the value of the {{cssxref("text-align")}} property {{unimplemented_inline}}.char
, this attribute is ignored.
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;top
, which will put the text as close to the top of the cell as it is possible.This element implements the {{domxref("HTMLTableRowElement")}} interface.
See {{HTMLElement("table")}} for examples on <tr>
.
{{CompatibilityTable}}
기능 | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 1.0 | {{CompatGeckoDesktop("1.0")}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
align/valign 속성 |
1.0 | {{CompatNo}} {{bug("915")}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
char/charoff 속성 |
1.0 | {{CompatNo}} {{bug("2212")}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
bgcolor 속성 {{Non-standard_inline}} |
{{CompatNo}} | {{CompatNo}} | {{CompatVersionUnknown}} | {{CompatNo}} | {{CompatNo}} |
기능 | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoMobile("1.0")}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
align/valign 속성 |
{{CompatUnknown}} | {{CompatNo}} {{bug("915")}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
char/charoff 속성 |
{{CompatUnknown}} | {{CompatNo}} {{bug("2212")}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
bgcolor 속성 {{Non-standard_inline}} |
{{CompatNo}} | {{CompatNo}} | {{CompatVersionUnknown}} | {{CompatNo}} | {{CompatNo}} |
<tr>
element:
{{HTMLRef}}