HTML <table> rules attribute
HTML <table> tag
Example
The following example specifies that only the borders between the rows should be visible:
<table rules="rows">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table> |
Try it yourself!
|
Definition and Usage
The rules attribute specifies which parts of the inside borders that should
be visible.
For practical reasons, it may be better to not specify any rules, and use CSS
instead.
Browser Support

The rules attribute is properly displayed in Firefox and Opera.
Internet Explorer, Chrome, and Safari 3 displays this attribute incorrectly.
- IE: Adds the four outside borders in addition to the inside borders
- Chrome and Safari: Adds the affected outside borders in addition to the
inside borders
Note: This attribute is not supported in Safari 2.0 or earlier versions.
Syntax
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
 |
|
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate is for developers who want to document their knowledge of JavaScript and the HTML DOM.
The XML Certificate is for developers who want to document their knowledge of XML, XML DOM and XSLT.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
The PHP Certificate is for developers who want to document their knowledge of PHP and SQL (MySQL).
|
|