Table rules property
Table object
Definition and Usage
The rules property can set or return the inner lines of a table.
Syntax
Set the rules property:
tableObject.rules="none|groups|rows|cols|all"
Return the rules property:
tableObject.rules
| Value | Description |
|---|---|
| none | No inner borders |
| groups | Displays the inner borders between row groups and column groups |
| rows | Displays the borders between inner rows |
| cols | Displays the inner borders between columns |
| all | Displays the inner borders between rows and columns |
Browser support





All major browsers support the rules property
Note: IE9 can display this property correctly. Earlier versions of IE add four outer borders in addition to the four inner borders.
Note: Chrome and Safari can display this property correctly: besides the inner borders, they also affect the outer borders.
Example
Example
The following example sets two different inner lines for a table:
| cell 1 | cell 2 |
| cell 3 | cell 4 |
Note: The rules property is not displayed correctly in Internet Explorer 9 and earlier versions.
Try it »
Table object