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
Rows
<table border="1" rules="rows">
<!--Internal rows and columns will remain same-->
</table>
Try It
Cols
<table border="1" rules="cols">
<!--Internal rows and columns will remain same-->
</table>
Try It
Groups
<table border="1" rules="groups">
<!--Internal rows and columns will remain same-->
</table>
Try It
None
<table border="1" rules="none">
<!--Internal rows and columns will remain same-->
</table>
Try It
All
<table border="1" rules="all">
<!--Internal rows and columns will remain same-->
</table>
Try It
Browser Support
Internet Explorer | Firefox | Chrome | Safari | Opera | Edge |
---|
9.0 | Yes | Yes | Yes | Yes | Yes |