Visit Mozilla.org

DOM:table

From MDC

« Gecko DOM Reference

Contents

[edit] HTML Table Element Interface

table objects expose the HTMLTableElement interface, which provides special properties and methods (beyond the regular element object interface they also have available to them by inheritance) for manipulating the layout and presentation of tables in HTML.

[edit] Properties

table.caption 
caption returns the table caption.
table.tHead 
tHead returns the table head.
table.tFoot 
tFoot returns the table footer.
table.rows 
rows returns the rows in the table.
table.tBodies 
tBodies returns the table bodies.
table.align 
align gets/sets the alignment of the table.
table.bgColor Deprecated 
bgColor gets/sets the background color of the table.
table.border 
border gets/sets the table border.
table.cellPadding 
cellPadding gets/sets the cell padding.
table.cellSpacing 
cellSpacing gets/sets the spacing around the table.
table.frame 
frame specifies which sides of the table have borders.
table.rules 
rules specifies which interior borders are visible.
table.summary 
summary gets/sets the table summary.
table.width 
width gets/sets the width of the table.

[edit] Methods

table.createTHead 
createTHead creates a table header.
table.deleteTHead 
deleteTHead removes the table header.
table.createTFoot 
createTFoot creates a table footer.
table.deleteTFoot 
deleteTFoot removes a table footer.
table.createCaption 
createCaption creates a new caption for the table.
table.deleteCaption 
deleteCaption removes the table caption.
table.insertRow 
insertRow inserts a new row.
table.deleteRow 
deleteRow removes a row.