# class HTMLTableElement

###

Module | khtml
Namespace | DOM
Class | HTMLTableElement
Inherits | DOM::HTMLElement

The create* and delete* methods on the table allow authors to construct and modify tables. HTML 4.0 specifies that only one of each of the CAPTION , THEAD , and TFOOT elements may exist in a table. Therefore, if one exists, and the createTHead() or createTFoot() method is called, the method returns the existing THead or TFoot element. See the TABLE element definition in HTML 4.0.

### methods

- HTMLTableElement ( )

  returns ctor

- HTMLTableElement (other)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  other | DOM.HTMLTableElement |

- HTMLTableElement (other)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  other | DOM.Node |

- HTMLTableElement (impl)

  returns ctor
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  impl | HTMLTableElementImpl |

- align ( )

  returns DOM.DOMString

  Specifies the table's position with respect to the rest of the document. See the align attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

- bgColor ( )

  returns DOM.DOMString

  Cell background color. See the bgcolor attribute definition in HTML 4.0. This attribute is deprecated in HTML 4.0.

- border ( )

  returns DOM.DOMString

  The width of the border around the table. See the border attribute definition in HTML 4.0.

- caption ( )

  returns DOM.HTMLTableCaptionElement

  Returns the table's CAPTION , or void if none exists.

- cellPadding ( )

  returns DOM.DOMString

  Specifies the horizontal and vertical space between cell content and cell borders. See the cellpadding attribute definition in HTML 4.0.

- cellSpacing ( )

  returns DOM.DOMString

  Specifies the horizontal and vertical separation between cells. See the cellspacing attribute definition in HTML 4.0.

- createCaption ( )

  returns DOM.HTMLElement

  Create a new table caption object or return an existing one.

  Returns A CAPTION element.

- createTFoot ( )

  returns DOM.HTMLElement

  Create a table footer row or return an existing one.

  Returns A footer element ( TFOOT ).

- createTHead ( )

  returns DOM.HTMLElement

  Create a table header row or return an existing one.

  Returns A new table header element ( THEAD ).

- deleteCaption ( )

  returns Nothing

  Delete the table caption, if one exists.

  Returns

- deleteRow (index)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  index | long |

  Delete a table row.

  index - The index of the row to be deleted. This index starts from 0 and is relative to the logical order (not document order) of all the rows contained inside the table. If the index is -1 the last row in the table is deleted.

  Returns

- deleteTFoot ( )

  returns Nothing

  Delete the footer from the table, if one exists.

  Returns

- deleteTHead ( )

  returns Nothing

  Delete the header from the table, if one exists.

  Returns

- frame ( )

  returns DOM.DOMString

  Specifies which external table borders to render. See the frame attribute definition in HTML 4.0.

- insertRow (index)

  returns DOM.HTMLElement

  Argument | Type | Default
  --- | --- | ---
  index | long |

  Insert a new empty row in the table. The new row is inserted immediately before and in the same section as the current indexth row in the table. If index is -1 or equal to the number of rows, the new row is appended. In addition, when the table is empty the row is inserted into a TBODY which is created and inserted into the table. Note. A table row cannot be empty according to HTML 4.0 Recommendation.

  index - The row number where to insert a new row. The index starts from 0 and is relative to the logical order (not document order) of all the rows contained inside the table.

  Returns The newly created row.

- rows ( )

  returns DOM.HTMLCollection

  Returns a collection of all the rows in the table, including all in THEAD , TFOOT , all TBODY elements.

- rules ( )

  returns DOM.DOMString

  Specifies which internal table borders to render. See the rules attribute definition in HTML 4.0.

- setAlign (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | DOM.DOMString |

  see align

- setBgColor (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | DOM.DOMString |

  see bgColor

- setBorder (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | DOM.DOMString |

  see border

- setCaption (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | DOM.HTMLTableCaptionElement |

  see caption

- setCellPadding (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | DOM.DOMString |

  see cellPadding

- setCellSpacing (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | DOM.DOMString |

  see cellSpacing

- setFrame (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | DOM.DOMString |

  see frame

- setRules (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | DOM.DOMString |

  see rules

- setSummary (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | DOM.DOMString |

  see summary

- setTFoot (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | DOM.HTMLTableSectionElement |

  see tFoot

- setTHead (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | DOM.HTMLTableSectionElement |

  see tHead

- setWidth (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | DOM.DOMString |

  see width

- summary ( )

  returns DOM.DOMString

  Supplementary description about the purpose or structure of a table. See the summary attribute definition in HTML 4.0.

- tBodies ( )

  returns DOM.HTMLCollection

  Returns a collection of the table bodies (including implicit ones).

- tFoot ( )

  returns DOM.HTMLTableSectionElement

  Returns the table's TFOOT , or null if none exists.

- tHead ( )

  returns DOM.HTMLTableSectionElement

  Returns the table's THEAD , or null if none exists.

- width ( )

  returns DOM.DOMString

  Specifies the desired table width. See the width attribute definition in HTML 4.0.