Interface HTMLTableElement

All Superinterfaces:
Element, EventTarget, HTMLElement, InnerHTML, Node, NonDocumentTypeChildNode, ParentNode
All Known Implementing Classes:
HTMLTableElementImpl

public interface HTMLTableElement extends HTMLElement
Provides special properties and methods (beyond the regular HTMLElement object interface it also has available to it by inheritance) for manipulating the layout and presentation of tables in an HTML document.
  • Method Details

    • getAlign

      @Deprecated String getAlign()
      Deprecated.
      Sets or retrieves a value that indicates the table alignment.
      Returns:
      a String object.
    • setAlign

      void setAlign(String align)

      setAlign.

      Parameters:
      align - a String object.
    • getBgColor

      @Deprecated String getBgColor()
      Deprecated.

      getBgColor.

      Returns:
      a String object.
    • setBgColor

      void setBgColor(String bgColor)

      setBgColor.

      Parameters:
      bgColor - a String object.
    • getBorder

      @Deprecated String getBorder()
      Deprecated.
      Sets or retrieves the width of the border to draw around the object.
      Returns:
      a String object.
    • setBorder

      void setBorder(String border)

      setBorder.

      Parameters:
      border - a String object.
    • getCaption

      Retrieves the caption object of a table.
      Returns:
      a HTMLTableCaptionElement object.
    • setCaption

      void setCaption(HTMLTableCaptionElement caption)

      setCaption.

      Parameters:
      caption - a HTMLTableCaptionElement object.
    • getCellPadding

      @Deprecated String getCellPadding()
      Deprecated.
      Sets or retrieves the amount of space between the border of the cell and the content of the cell.
      Returns:
      a String object.
    • setCellPadding

      void setCellPadding(String cellPadding)

      setCellPadding.

      Parameters:
      cellPadding - a String object.
    • getCellSpacing

      @Deprecated String getCellSpacing()
      Deprecated.
      Sets or retrieves the amount of space between cells in a table.
      Returns:
      a String object.
    • setCellSpacing

      void setCellSpacing(String cellSpacing)

      setCellSpacing.

      Parameters:
      cellSpacing - a String object.
    • getFrame

      @Deprecated String getFrame()
      Deprecated.
      Sets or retrieves the way the border frame around the table is displayed.
      Returns:
      a String object.
    • setFrame

      void setFrame(String frame)

      setFrame.

      Parameters:
      frame - a String object.
    • getRows

      HTMLCollection getRows()
      Sets or retrieves the number of horizontal rows contained in the object.
      Returns:
      a HTMLCollection object.
    • getRules

      @Deprecated String getRules()
      Deprecated.
      Sets or retrieves which dividing lines (inner borders) are displayed.
      Returns:
      a String object.
    • setRules

      void setRules(String rules)

      setRules.

      Parameters:
      rules - a String object.
    • getSummary

      @Deprecated String getSummary()
      Deprecated.
      Sets or retrieves a description and/or structure of the object.
      Returns:
      a String object.
    • setSummary

      void setSummary(String summary)

      setSummary.

      Parameters:
      summary - a String object.
    • gettBodies

      HTMLCollection gettBodies()
      Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.
      Returns:
      a HTMLCollection object.
    • gettFoot

      Retrieves the tFoot object of the table.
      Returns:
      a HTMLTableSectionElement object.
    • settFoot

      void settFoot(HTMLTableSectionElement tFoot)

      settFoot.

      Parameters:
      tFoot - a HTMLTableSectionElement object.
    • gettHead

      Retrieves the tHead object of the table.
      Returns:
      a HTMLTableSectionElement object.
    • settHead

      void settHead(HTMLTableSectionElement tHead)

      settHead.

      Parameters:
      tHead - a HTMLTableSectionElement object.
    • getWidth

      @Deprecated String getWidth()
      Deprecated.
      Sets or retrieves the width of the object.
      Returns:
      a String object.
    • setWidth

      void setWidth(String width)

      setWidth.

      Parameters:
      width - a String object.
    • createCaption

      HTMLElement createCaption()
      Creates an empty caption element in the table.
      Returns:
      a HTMLElement object.
    • createTBody

      HTMLElement createTBody()
      Creates an empty tBody element in the table.
      Returns:
      a HTMLElement object.
    • createTFoot

      HTMLElement createTFoot()
      Creates an empty tFoot element in the table.
      Returns:
      a HTMLElement object.
    • createTHead

      HTMLElement createTHead()
      Returns the tHead element object if successful, or null otherwise.
      Returns:
      a HTMLElement object.
    • deleteCaption

      void deleteCaption()
      Deletes the caption element and its contents from the table.
    • deleteRow

      void deleteRow(int index)
      Removes the specified row (tr) from the element and from the rows collection.
      Parameters:
      index - Number that specifies the zero-based position in the rows collection of the row to remove.
    • deleteTFoot

      void deleteTFoot()
      Deletes the tFoot element and its contents from the table.
    • deleteTHead

      void deleteTHead()
      Deletes the tHead element and its contents from the table.
    • deleteTBody

      void deleteTBody()
      Deletes the tBody element and its contents from the table.
    • insertRow

      HTMLTableRowElement insertRow(int index) throws Exception
      Creates a new row (tr) in the table, and adds the row to the rows collection.
      Parameters:
      index - Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
      Returns:
      a HTMLTableRowElement object.
      Throws:
      Exception - if any.
    • insertRow

      HTMLTableRowElement insertRow()

      insertRow.

      Returns:
      a HTMLTableRowElement object.