Skip to content
Related Articles

Related Articles

Improve Article

HTML | <table> rules Attribute

  • Last Updated : 29 May, 2019

The HTML <table> rules Attribute is used to specify the which parts of the inside borders that should be visible.

Syntax:

<table rules="value">

Attribute Values:

  • none: It does not create any lines.
  • groups: It create lines between row and column groups.
  • rows: It creates line between the rows.
  • cols: It creates line between the columns.
  • all: It creates line between the rows and columns.

Note: The <table> rules Attribute is not supported by HTML 5.

Example:






<!DOCTYPE html>
<html>
  
<head>
    <title>
        HTML table rules Attribute
    </title>
</head>
  
<body>
    <h1>GeeksforGeeks</h1>
  
    <h2>HTML table rules Attribute</h2>
  
    <table rules="rows">
        <tr>
            <th>NAME</th>
            <th>AGE</th>
            <th>BRANCH</th>
        </tr>
        <tr>
            <td>BITTU</td>
            <td>22</td>
            <td>CSE</td>
        </tr>
    </table>
    <br>
    <table rules="cols">
        <tr>
            <th>NAME</th>
            <th>AGE</th>
            <th>BRANCH</th>
        </tr>
        <tr>
            <td>BITTU</td>
            <td>22</td>
            <td>CSE</td>
        </tr>
    </table>
    <br>
    <table rules="all">
        <tr>
            <th>NAME</th>
            <th>AGE</th>
            <th>BRANCH</th>
        </tr>
        <tr>
            <td>BITTU</td>
            <td>22</td>
            <td>CSE</td>
        </tr>
    </table>
</body>
  
</html>

Output:

Supported Browsers: The browser supported by HTML <table> rulesĀ Attribute are listed below:

  • Google Chrome
  • Internet Explorer 9.0
  • Firefox
  • Safari
  • Opera

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.




My Personal Notes arrow_drop_up
Recommended Articles
Page :