All Packages Class Hierarchy This Package Previous Next Index
Interface org.w3c.dom.html.HTMLTableElement
- public interface HTMLTableElement
- extends HTMLElement
The create* and delete* methods on the table allow authors to constructand
modify tables. HTML 4.0 specifies that only one of each of the
CAPTION, THEAD, and TFOOTelements
may exist in a table. Therefore, if one exists, and thecreateTHead() or
createTFoot() method is called, the method returnsthe existing THead or
TFoot element. See the TABLE element definition in HTML 4.0.
-
createCaption()
- Create a new table caption object or return an existing one.
-
createTFoot()
- Create a table footer row or return an existing one.
-
createTHead()
- Create a table header row or return an existing one.
-
deleteCaption()
- Delete the table caption, if one exists.
-
deleteRow(int)
- Delete a table row.
-
deleteTFoot()
- Delete the footer from the table, if one exists.
-
deleteTHead()
- Delete the header from the table, if one exists.
-
getAlign()
- Specifies the table's position with respect to the rest of the document.
-
getBgColor()
- Cell background color.
-
getBorder()
- The width of the border around the table.
-
getCaption()
- Returns the table's
CAPTION, or void if none exists.
-
getCellPadding()
- Specifies the horizontal and vertical space between cell content andcell
borders.
-
getCellSpacing()
- Specifies the horizontal and vertical separation between cells.
-
getFrame()
- Specifies which external table borders to render.
-
getRows()
- Returns a collection of all the rows in the table, including all in
THEAD, TFOOT, all TBODY elements.
-
getRules()
- Specifies which internal table borders to render.
-
getSummary()
- Supplementary description about the purpose or structureof a table.
-
getTBodies()
- Returns a collection of the defined table bodies.
-
getTFoot()
- Returns the table's
TFOOT, or null if none
exists.
-
getTHead()
- Returns the table's
THEAD, or null if none
exists.
-
getWidth()
- Specifies the desired table width.
-
insertRow(int)
- Insert a new empty row in the table.Note.
-
setAlign(String)
-
-
setBgColor(String)
-
-
setBorder(String)
-
-
setCaption(HTMLTableCaptionElement)
-
-
setCellPadding(String)
-
-
setCellSpacing(String)
-
-
setFrame(String)
-
-
setRules(String)
-
-
setSummary(String)
-
-
setTFoot(HTMLTableSectionElement)
-
-
setTHead(HTMLTableSectionElement)
-
-
setWidth(String)
-
getCaption
public abstract HTMLTableCaptionElement getCaption()
- Returns the table's
CAPTION, or void if none exists.
setCaption
public abstract void setCaption(HTMLTableCaptionElement caption)
getTHead
public abstract HTMLTableSectionElement getTHead()
- Returns the table's
THEAD, or null if none
exists.
setTHead
public abstract void setTHead(HTMLTableSectionElement tHead)
getTFoot
public abstract HTMLTableSectionElement getTFoot()
- Returns the table's
TFOOT, or null if none
exists.
setTFoot
public abstract void setTFoot(HTMLTableSectionElement tFoot)
getRows
public abstract HTMLCollection getRows()
- Returns a collection of all the rows in the table, including all in
THEAD, TFOOT, all TBODY elements.
getTBodies
public abstract HTMLCollection getTBodies()
- Returns a collection of the defined table bodies.
getAlign
public abstract String getAlign()
- 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.
setAlign
public abstract void setAlign(String align)
getBgColor
public abstract String getBgColor()
- Cell background color. See the bgcolor attribute definition in HTML 4.0.
This attribute is deprecated in HTML 4.0.
setBgColor
public abstract void setBgColor(String bgColor)
getBorder
public abstract String getBorder()
- The width of the border around the table. See the border attribute
definition in HTML 4.0.
setBorder
public abstract void setBorder(String border)
getCellPadding
public abstract String getCellPadding()
- Specifies the horizontal and vertical space between cell content andcell
borders. See the cellpadding attribute definition in HTML 4.0.
setCellPadding
public abstract void setCellPadding(String cellPadding)
getCellSpacing
public abstract String getCellSpacing()
- Specifies the horizontal and vertical separation between cells. See the
cellspacing attribute definition in HTML 4.0.
setCellSpacing
public abstract void setCellSpacing(String cellSpacing)
getFrame
public abstract String getFrame()
- Specifies which external table borders to render. See the frame attribute
definition in HTML 4.0.
setFrame
public abstract void setFrame(String frame)
getRules
public abstract String getRules()
- Specifies which internal table borders to render. See the rules attribute
definition in HTML 4.0.
setRules
public abstract void setRules(String rules)
getSummary
public abstract String getSummary()
- Supplementary description about the purpose or structureof a table. See
the summary attribute definition in HTML 4.0.
setSummary
public abstract void setSummary(String summary)
getWidth
public abstract String getWidth()
- Specifies the desired table width. See the width attribute definition in
HTML 4.0.
setWidth
public abstract void setWidth(String width)
createTHead
public abstract HTMLElement createTHead()
- Create a table header row or return an existing one.
- Returns:
- A new table header element (
THEAD).
deleteTHead
public abstract void deleteTHead()
- Delete the header from the table, if one exists.
createTFoot
public abstract HTMLElement createTFoot()
- Create a table footer row or return an existing one.
- Returns:
- A footer element (
TFOOT).
deleteTFoot
public abstract void deleteTFoot()
- Delete the footer from the table, if one exists.
createCaption
public abstract HTMLElement createCaption()
- Create a new table caption object or return an existing one.
- Returns:
- A
CAPTION element.
deleteCaption
public abstract void deleteCaption()
- Delete the table caption, if one exists.
insertRow
public abstract HTMLElement insertRow(int index)
- Insert a new empty row in 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.
- Returns:
- The newly created row.
deleteRow
public abstract void deleteRow(int index)
- Delete a table row.
- Parameters:
- index - The index of the row to be deleted.
All Packages Class Hierarchy This Package Previous Next Index