HTML DOM Table Object

« Previous Chapter Next Reference »

Table Object

The Table object represents an HTML table.

For each <table> tag in an HTML document, a Table object is created.

Table Object Collections

W3C: W3C Standard.

Collection Description W3C
cells[] Returns an array containing each cell in a table No
rows[] Returns an array containing each row in a table Yes
tBodies[] Returns an array containing each tbody in a table Yes

Table Object Properties

Property Description W3C
border Sets or returns the width of the table border Yes
caption Sets or returns the caption of a table Yes
cellPadding Sets or returns the amount of space between the cell border and cell content Yes
cellSpacing Sets or returns the amount of space between the cells in a table Yes
frame Sets or returns the outer-borders of a table Yes
rules Sets or returns the inner-borders of a table Yes
summary Sets or returns a description of a table Yes
tFoot Returns the TFoot object of a table Yes
tHead Returns the THead object of a table Yes
width Sets or returns the width of a table Yes

Table Object Methods

Method Description W3C
createCaption() Creates a caption element for a table Yes
createTFoot() Creates an empty tFoot element in a table Yes
createTHead() Creates an empty tHead element in a table Yes
deleteCaption() Deletes the caption element and its content from a table Yes
deleteRow() Deletes a row from a table Yes
deleteTFoot() Deletes the tFoot element and its content from a table Yes
deleteTHead() Deletes the tHead element and its content from a table Yes
insertRow() Inserts a new row in a table Yes

Standard Properties, Methods, and Events

The Table object also supports the standard properties, methods, and events.


« Previous Chapter Next Reference »

Have Any Suggestion? We Are Waiting To Hear from YOU!

Your Query was successfully sent!