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.
Delete a table row.
Parameters: index - The index of the row to be deleted. This index starts from 0 and is relative to all the rows contained inside the table, regardless of section parentage. exception: DOMException - INDEX_SIZE_ERR: Raised if the specified index is greater than or equal to the number of rows or if the index is negative.
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.
Insert a new empty row in the table. The new row is inserted
immediately before and in the same section as the current
index th row in the table. If index is 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.
Parameters: index - The row number where to insert a new row. This index starts from 0 and is relative to all the rows contained inside the table, regardless of section parentage. The newly created row. exception: DOMException - INDEX_SIZE_ERR: Raised if the specified index is greater than the number of rows or if the index is negative.