{{DOMRef}}
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.
Properties
Inherits properties from its parent, {{domxref("HTMLElement")}}.
- {{domxref("HTMLTableRowElement.align")}} {{obsolete_inline}}
-
Is a {{domxref("DOMString")}} containing an enumerated value reflecting the {{htmlattrxref("align", "tr")}} attribute. It indicates the alignment of the element's contents with respect to the surrounding context. The possible values are
"left"
,"right"
, and"center"
. - {{domxref("HTMLTableRowElement.bgColor")}} {{obsolete_inline}}
- Is a {{domxref("DOMString")}} containing the background color of the cells. It reflects the obsolete {{htmlattrxref("bgColor", "tr")}} attribute.
- {{domxref("HTMLTableRowElement.cells")}}
- cells returns a read-only {{domxref("HTMLCollection")}} of the cells in the row.
- {{domxref("HTMLTableRowElement.ch")}} {{obsolete_inline}}
-
Is a {{domxref("DOMString")}} containing one single chararcter. This character is the one to align all the cell of a column on. It reflects the {{htmlattrxref("char", "tr")}} and default to the decimal points associated with the language, e.g.
'.'
for English, or','
for French. This property was optional and was not very well supported. - {{domxref("HTMLTableRowElement.chOff")}} {{obsolete_inline}}
-
Is a {{domxref("DOMString")}} containing a integer indicating how many characters must be left at the right (for left-to-right scripts; or at the left for right-to-left scripts) of the character defined by
HTMLTableRowElement.ch
. This property was optional and was not very well supported. - {{domxref("HTMLTableRowElement.rowIndex")}}
- rowIndex gets the logical order of the row within the entire table.
- {{domxref("HTMLTableRowElement.sectionRowIndex")}}
- sectionRowIndex gets the logical order of the row within the table section it belongs to.
- {{domxref("HTMLTableRowElement.vAlign")}} {{obsolete_inline}}
-
Is a {{domxref("DOMString")}} representing an enumerated value indicating how the content of the cell must be vertically aligned. It reflects the {{htmlattrxref("valign", "tr")}} attribute and can have one of the following values:
"top"
,"middle"
,"bottom"
, or"baseline"
.
Methods
Inherits methods from its parent, {{domxref("HTMLElement")}}.
- {{domxref("HTMLTableRowElement.deleteCell()")}}
- deleteCell deletes a cell from the row.
- {{domxref("HTMLTableRowElement.insertCell()")}}
- insertCell inserts a new cell into the row and returns a reference to the new cell.