HTMLTableRowElement

  • Revision slug: Web/API/HTMLTableRowElement
  • Revision title: HTMLTableRowElement
  • Revision id: 410315
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{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.

Revision Source

<p>{{DOMRef}}</p>
<p>The <strong><code>HTMLTableRowElement</code></strong> 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.</p>
<h2 id="Properties" name="Properties">Properties</h2>
<p><em>Inherits properties from its parent, {{domxref("HTMLElement")}}.</em></p>
<dl>
  <dt>
    {{domxref("HTMLTableRowElement.align")}} {{obsolete_inline}}</dt>
  <dd>
    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 <code>"left"</code>, <code>"right"</code>, and <code>"center"</code>.</dd>
  <dt>
    {{domxref("HTMLTableRowElement.bgColor")}} {{obsolete_inline}}</dt>
  <dd>
    Is a {{domxref("DOMString")}} containing the background color of the cells. It reflects the obsolete {{htmlattrxref("bgColor", "tr")}} attribute.</dd>
  <dt>
    {{domxref("HTMLTableRowElement.cells")}}</dt>
  <dd>
    <strong>cells</strong> returns a read-only {{domxref("HTMLCollection")}} of the cells in the row.</dd>
  <dt>
    {{domxref("HTMLTableRowElement.ch")}} {{obsolete_inline}}</dt>
  <dd>
    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. <code>'.'</code> for English, or <code>','</code> for French. This property was optional and was not very well supported.</dd>
  <dt>
    {{domxref("HTMLTableRowElement.chOff")}} {{obsolete_inline}}</dt>
  <dd>
    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 <code>HTMLTableRowElement.ch</code>. This property was optional and was not very well supported.</dd>
  <dt>
    {{domxref("HTMLTableRowElement.rowIndex")}}</dt>
  <dd>
    <strong>rowIndex</strong> gets the logical order of the row within the entire table.</dd>
  <dt>
    {{domxref("HTMLTableRowElement.sectionRowIndex")}}</dt>
  <dd>
    <strong>sectionRowIndex</strong> gets the logical order of the row within the table section it belongs to.</dd>
  <dt>
    {{domxref("HTMLTableRowElement.vAlign")}} {{obsolete_inline}}</dt>
  <dd>
    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: <code>"top"</code>, <code>"middle"</code>, <code>"bottom"</code>, or <code>"baseline"</code>.</dd>
</dl>
<h2 id="Methods" name="Methods">Methods</h2>
<p><em>Inherits methods from its parent, {{domxref("HTMLElement")}}</em>.</p>
<dl>
  <dt>
    {{domxref("HTMLTableRowElement.deleteCell()")}}</dt>
  <dd>
    <strong>deleteCell</strong> deletes a cell from the row.</dd>
  <dt>
    {{domxref("HTMLTableRowElement.insertCell()")}}</dt>
  <dd>
    <strong>insertCell</strong> inserts a new cell into the row and returns a reference to the new cell.</dd>
</dl>
Revert to this revision