HTML DOM Table rules Property Last Updated : 04 Jan, 2022 Comments Improve Suggest changes Like Article Like Report The HTML DOM Table rules property is used to set or return the value of the rules attribute of the <table> tag. The rules attribute is used to define which part of the borders should be visible. Note: This property is no longer supported in HTML5. Syntax It returns the rules property. tableObject.rules; It is used to set the rules of property. tableObject.rules="values"; Property Values: none: It does not create any lines.groups: It creates lines between row and column groups.rows: It creates lines between the rows.cols: It creates lines between the columns.all: It creates lines between the rows and columns. Example 1: Below HTML code returns the table rules property. HTML <!DOCTYPE html> <html> <head> <style> h1 { color: green; } body { text-align: center; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2>HTML DOM Table rules Property</h2> <table id="tableID" align="center" rules="rows" summary="courses@GeeksforGeeks" frame="void"> <thead> <tr> <th>Subject</th> <th>Courses</th> </tr> </thead> <tr> <td>Java</td> <td>Fork Java</td> </tr> <tr> <td>Python</td> <td>Fork Python</td> </tr> <tr> <td>Placements</td> <td>Sudo Placement</td> </tr> </table> <br> <button ondblclick="dblClick()"> Return </button> <p id="paraID"></p> <script> function dblClick() { var w = document.getElementById("tableID").rules; document.getElementById("paraID").innerHTML = w; } </script> </body> </html> Output: Example 2: Below HTML code illustrates how to set the rules property. HTML <!DOCTYPE html> <html> <head> <style> h1 { color: green; } body { text-align: center; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2>HTML DOM Table rules Property</h2> <table id="tableID" align="center" rules="rows" summary="courses@GeeksforGeeks" frame="void"> <thead> <tr> <th>Subject</th> <th>Courses</th> </tr> </thead> <tr> <td>Java</td> <td>Fork Java</td> </tr> <tr> <td>Python</td> <td>Fork Python</td> </tr> <tr> <td>Placements</td> <td>Sudo Placement</td> </tr> </table> <br> <button ondblclick="dblClick()"> Return </button> <p id="paraID"></p> <script> function dblClick() { var w = document.getElementById( "tableID").rules = "cols"; document.getElementById( "paraID").innerHTML = w; } </script> </body> </html> Output: Supported Browsers Google ChromeInternet ExplorerOperaApple SafariFirefox Comment More infoAdvertise with us Next Article HTML DOM Table rules Property M manaschhabra2 Follow Improve Article Tags : HTML HTML-DOM HTML-Property Similar Reads HTML DOM Table Summary Property The HTML DOM Table Summary Property is used to set or return the value of the summary attribute of a <table> element. The summary attribute is used to define the summary of the table. Note: This property is not supported by HTML5 Syntax: It is used to return the Table Summary property.tableObj 1 min read HTML | DOM Style tableLayout Property The DOM Style tableLayout property is used to set or return how a table and its cells, rows, and columns should be laid out. Syntax: It returns the tableLayout Propertyobject.style.tableLayoutIt used to set the tableLayout Propertyobject.style.tableLayout = "auto | fixed | initial | inherit" Return 3 min read HTML DOM Table frame Property The HTML DOM Table frame property is used to set or return the value of the frame attribute of an <table> element. The frame attribute is used to specify the visibility of outside borders. Note: This property is not supported by HTML5 Syntax It is used to return the frame property. tableObject 2 min read HTML | DOM Table tHead Property The Table tHead property is used for returning a reference to the <thead> element of a table. The <thead> element is used for grouping the header content in an HTML table. It returns NULL if the <thead> element is not defined.Syntax tableObject.tHeadReturn Value : A reference to th 1 min read HTML | DOM Table width Property The Table width property in HTML DOM is used to set or return the value of the width attribute of a table. Note: This property is not supported by HTML5. Syntax: It returns the width property of a table.tableObject.width;It is used to set the width property of a table.tableObject.width ="pixels"; At 2 min read Like