--- title: HTMLTableRowElement slug: Web/API/HTMLTableRowElement tags: - API translation_of: Web/API/HTMLTableRowElement ---
The HTMLTableRowElement
interface provides special properties and methods (beyond the {{domxref("HTMLElement")}} interface it also has available to it by inheritance) for manipulating the layout and presentation of rows in an HTML table.
Inherits properties from its parent, {{domxref("HTMLElement")}}.
"left"
, "right"
, and "center"
.HTMLCollection
is live and is automatically updated when cells are added or removed.'.'
for English, or ','
for French. This property was optional and was not very well supported.HTMLTableRowElement.ch
. This property was optional and was not very well supported.long
value which gives the logical position of the row within the entire table. If the row is not part of a table, returns -1
.long
value which gives the logical position of the row within the table section it belongs to. If the row is not part of a section, returns -1
."top"
, "middle"
, "bottom"
, or "baseline"
.Inherits methods from its parent, {{domxref("HTMLElement")}}.
0
, it raises a {{domxref("DOMException")}} with the IndexSizeError
value.-1
, it appends the cell to the row. If the given position is greater (or equal as it starts at zero) than the amount of cells in the row, or is smaller than -1
, it raises a {{domxref("DOMException")}} with the IndexSizeError
value. Returns a reference to a HTMLTableCellElement [en-US].Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', "tabular-data.html#the-tr-element", "HTMLTableRowElement")}} | {{Spec2('HTML WHATWG')}} | No change from {{SpecName("HTML5 W3C")}}. |
{{SpecName('HTML5 W3C', "tabular-data.html#the-tr-element", "HTMLTableRowElement")}} | {{Spec2('HTML5 W3C')}} | The parameter of insertCell is now optional and default to -1 . |
{{SpecName('DOM2 HTML', 'html.html#ID-6986576', 'HTMLTableRowElement')}} | {{Spec2('DOM2 HTML')}} | The cells , rowIndex , and selectionRowIndex properties are now read-only.The methods insertCell and deleteCell can raise exceptions. |
{{SpecName('DOM1', 'level-one-html.html#ID-6986576', 'HTMLTableRowElement')}} | {{Spec2('DOM1')}} | Initial definition. |
{{Compat("api.HTMLTableRowElement")}}