Articles → HTML → Rules Attribute In HTML
Rules Attribute In HTML
The Objective Of This Tutorial
Technical Knowledge
Rules
- rows → to display lines between rows
- cols → to display lines between columns
- groups → to display lines between rows and column groups
- none → to hide all the lines
- all → to display all the lines between rows and columns
- IE 9+
- Firefox
- Opera
- Chrome
- Safari
Create An HTML Table
<html>
<body>
<form method="Post">
<table border="1">
<thead>
<tr>
<td>
Label
</td>
<td>
Fields
</td>
</tr>
</thead>
<tr>
<td>
User Name
</td>
<td>
<input type="text" />
</td>
</tr>
<tr>
<td>
Password
</td>
<td>
<input type="text" />
</td>
</tr>
<tr>
<td>
Address
</td>
<td>
<input type="text" />
</td>
</tr>
</table>
</form>
</body>
</html>
Try It
Click to Enlarge
Rows
<table border="1" rules="rows">
<!--Internal rows and columns will remain same-->
</table>
Try It
Click to Enlarge
Cols
<table border="1" rules="cols">
<!--Internal rows and columns will remain same-->
</table>
Try It
Click to Enlarge
Groups
<table border="1" rules="groups">
<!--Internal rows and columns will remain same-->
</table>
Try It
Click to Enlarge
None
<table border="1" rules="none">
<!--Internal rows and columns will remain same-->
</table>
Try It
Click to Enlarge
All
<table border="1" rules="all">
<!--Internal rows and columns will remain same-->
</table>
Try It
Click to Enlarge
Browser Support
Internet Explorer | Firefox | Chrome | Safari | Opera | Edge |
---|
9.0 | Yes | Yes | Yes | Yes | Yes |