What is HTML Rules Attribute

In this article we will discuss about how to use the Rules Attribute in the table Tag in HTML.
  • 1928

The rules attribute of the table tag is used to specify which part of the table border should be visible. Chrome and Safari displays this attribute incorrectly: They add the affected outside borders in addition to the inside borders.

HTML Code:

<html>

<body>

 

<p><font color="red">Rules attribute</font></p>

<table rules="rows">

  <tr>

    <th>Month</th>

    <th>Year</th>

  </tr>

  <tr>

    <td>January</td>

    <td>1990</td>

  </tr>

</table>

 

<p>Table with rules="cols":</p>

<table rules="cols">

  <tr>

    <th>Month</th>

    <th>Year</th>

  </tr>

  <tr>

    <td>January</td>

    <td>1990</td>

  </tr>

</table>

 

<p>Table with rules="all":</p>

<table rules="all">

  <tr>

    <th>Month</th>

    <th>Year</th>

  </tr>

  <tr>

    <td>January</td>

    <td>1990</td>

  </tr>

</table>

 

</body>

</html>

Output:

 selectt.jpg

Ask Your Question 
 
Got a programming related question? You may want to post your question here
 

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.