TABLE.width (Property)

The width of the TABLE in pixels.


DOM level - 1
JavaScript - 1.5
JScript - 3.0
Internet Explorer - 4.0
Netscape - 6.0
Property/method value type:String primitive
JavaScript syntax:-myTABLE.width

A table will be sized according to the content within it. The HTML tags for the table allow the table width to be specified as a percentage of the width of the containing HTML element. When the table is rendered, an extent rectangle can be drawn round it. An extent rectangle is the smallest rectangle that will completely enclose the table. This width property returns the horizontal size of that extent rectangle.

Including height and width information on tables is optional but it can significantly improve the performance of the layout engine as it renders the web page. This is because the layout engine does not need to wait until the table content has all been fetched before reserving sufficient space for it in the display.

See also:TABLE.height