The IHTMLTable interface is used to specify that the contained content is organized into a table with rows and columns.
IHTMLTable Methods
createCaption Creates a table caption. If no caption exists, this creates an empty table caption, adds it to the table, and returns a pointer to it. If captions already exist, this method returns a pointer to the first one in the list. createTFoot Creates a TFOOT for the table. If a table foot already exists, this returns a pointer to it. Otherwise, an empty foot is created and added to a table, and a pointer to the empty foot is returned. createTHead Creates a THEAD for the table. When a table head already exists, this will return a pointer to it. If a table head doesn't exist, an empty table head is created and the pointer to that is returned. deleteCaption Deletes the caption from a table. If there are multiple captions in the table, this method deletes the first caption and all its contents from the table. deleteRow Removes the row indicated by the value of the zero-based index parameter from this table section. deleteTFoot Deletes a TFOOT from the table. deleteTHead Deletes the THEAD element and all its contents from the table. get_align Retrieves how the table should be aligned. get_background Retrieves the current background picture for the table, if any. The picture is tiled behind the text and graphics in the table. get_bgColor Retrieves the current background color of the table. get_border Retrieves the width of the border drawn around the TABLE. get_borderColor Retrieves the border color and must be used with the border property. get_borderColorDark Retrieves independent border color control over one of the two colors used to draw a 3-D border, opposite of borderColorLight, and must be used with the border property. get_borderColorLight Retrieves independent border color control over one of the two colors used to draw a 3-D border, opposite of borderColorDark, and must be used with the border property. get_caption Returns an IHTMLTableCaption pointer to the first caption in the table. If the table does not contain a caption, NULL is returned. get_cellPadding Retrieves the amount of space between the border of the cell and the contents of the cell. get_cellSpacing Retrieves the amount of space between cells in a table. get_cols Retrieves the number of columns in the table. get_dataPageSize Retrieves the number of records displayed per page in a data-bound table. get_frame Retrieves a description of the border frame around the table. get_height Retrieves the height of the table, in pixels. get_onreadystatechange Retrieves a pointer to the event handler function associated with the onreadystatechange event for the IHTMLTable object. This script is executed when the onreadystatechange event is fired. get_readyState Returns the readyState enumeration string for the table's current ready state. get_rows Retrieves a collection of all rows in the table. This is a collection of all the TR elements defined in the THEAD, TBODY, and TFOOT elements of the table. get_rules Retrieves which dividing lines are displayed. These are the inner borders of the table cells. get_tBodies Returns an IHTMLTableSection pointer to all the table bodies in this table. The length of this collection is the count of bodies returned. get_tFoot Returns an IHTMLTableSection pointer to the foot section of a table. It returns NULL if there isn't one. If multiple table foots are listed in an HTML document, only the first one is treated as the foot of the table. get_tHead Returns an IHTMLTableSection pointer to the head section of a table. It returns NULL if there isn't one. If multiple table heads are listed in an HTML document, only the first one is treated as the head of the table. get_width Retrieves the calculated width of the table, in pixels. insertRow Inserts an empty row into the table section. The row is added at the position indicated by the zero-based index provided. For example, passing in 1 adds the row between 0 and 1, thus becoming the row with index 1. Passing in -1 or the size of the collection causes the row to be appended. nextPage Displays the next block of records in a data-bound table. The number of records is determined by the dataPageSize property on the IHTMLTable object. previousPage Displays the previous block of records in a data-bound table. The number of records is determined by the dataPageSize property on the IHTMLTable object. put_align Sets how the table should be aligned. put_background Sets a background picture for the table. The picture is tiled behind the text and graphics in the table. put_bgColor Sets the background color of the table. put_border Sets the width of the border to be drawn around the TABLE. put_borderColor Sets the border color and must be used with the border property. put_borderColorDark Sets independent border color control over one of the two colors used to draw a 3-D border, opposite of borderColorLight, and must be used with the border property. put_borderColorLight Sets independent border color control over one of the two colors used to draw a 3-D border, opposite of borderColorDark, and must be used with the border property. put_cellPadding Sets the amount of space between the border of the cell and the contents of the cell. put_cellSpacing Sets the amount of space between cells in a table. put_cols Sets the number of columns in the table. put_dataPageSize Sets the number of records displayed in a data-bound table. put_frame Sets the appearance of the border frame around the table. put_height Sets the height of the table, in pixels. put_onreadystatechange Sets a pointer to the event handler function associated with the onreadystatechange event for the IHTMLTable object. This script is executed when the onreadystatechange event is fired. put_rules Specifies which dividing lines are displayed. These are the inner borders of the table cells. put_width Sets the width of the table, in pixels. refresh Refreshes the content of the table.
Interface Information
Implementation System (Mshtml.dll) Inherits from IDispatch Header and IDL files Mshtml.h, Mshtml.idl Minimum availability Internet Explorer 4.0 Minimum operating systems Windows 95, Windows NT 4.0
Windows CE
Windows CE Use version 2.12 and later Minimum availability Internet Explorer 4.0
Remarks
Valid tags within a table include CAPTION, COL, COLGROUP, TBODY, THEAD, TFOOT, and TR.
The TABLE element is a block element.