Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Table frame property

Table frame property

Table Object Reference Table object


Definition and Usage

The frame property can set or return the outer border of a table.

Syntax

Set the frame property:

tableObject.frame="void|above|below|hsides|vsides|lhs|rhs|box|border"

Return the frame property:

tableObject.frame

Value Description
void No outer border is displayed. Default.
above Displays the top outer border
below Displays the bottom outer border
hsides Displays the top and bottom outer borders
vsides Displays the left and right outer borders
lhs Displays the left outer border
rhs Displays the right outer border
box Displays the outer border on all four sides
border Displays the outer border on all four sides

Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the frame property


Example

Example

The following example sets two different borders for a table:

Runoob Tutorial(runoob.com)

        

        

        

        

cell 1 cell 2
cell 3 cell 4

Note:The frame property is not displayed correctly in Internet Explorer 9 and earlier versions.

Try it »


Table Object Reference Table object