HTML <table> rulesAttribute
Examples
Only show borders between rows:
<table rules="rows">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
Internet Explorer 9+, Firefox, Opera, Chrome, and Safari support the rules attribute.
Note:Internet Explorer 8 and earlier versions do not support the rules attribute of the <table> tag.
Note:Chrome and Safari do not display this attribute correctly: in addition to the inner borders, an affected outer border is also added.
Definition and Usage
HTML5 does not support the <table> rules attribute. Please use CSS instead.
The rules attribute specifies which part of the inner borders is visible.
For practical purposes, it is better not to specify rules, but to use CSS to addborders (border styles)。
Syntax
<table rules="value">
Attribute Values
| Value | Description |
|---|---|
| none | No lines. |
| groups | Lines between row groups and column groups. |
| rows | Lines between rows. |
| cols | Lines between columns. |
| all | Lines between rows and columns. |
HTML <table> Tag Other Extensions