A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/html/attributes/rules below:

rules · WebPlatform Docs

rules

## Examples

This example initially sets the RULES attribute on the table, and then uses the rules property to dynamically change the table borders.

<TABLE ID="oID_1" RULES="cols">
<THEAD>
<TR>
<TD>EST</TD><TD>1am</TD><TD>8pm</TD>
</TR>
</THEAD>
<TR>
<TD>CST</TD><TD>2am</TD><TD>9pm</TD>
</TR>
<TR>
<TD>MST</TD><TD>3am</TD><TD>10pm</TD>
</TR>
<TFOOT>
<TR>
<TD>PST</TD><TD>4am</TD><TD>11pm</TD>
</TR>
</TFOOT>
</TABLE>
<P>
<BUTTON onclick="oID_1.rules=''">No borders</BUTTON>
<BUTTON onclick="oID_1.rules='none'">Exterior border</BUTTON>
<BUTTON onclick="oID_1.rules='all'">All borders</BUTTON><BR>
<BUTTON onclick="oID_1.rules='cols'">Column borders</BUTTON>
<BUTTON onclick="oID_1.rules='groups'">Groups borders</BUTTON>
<BUTTON onclick="oID_1.rules='rows'">Table row borders</BUTTON>
</P>

View live example

In this example, the table object contains the RULES attribute set to cols and the border attribute set to an empty string (“”). This example demonstrates that if the RULES attribute is set to an empty string (“”), the border attribute will cause the table to show all borders, trumping the RULES attribute.

<TABLE ID="oID_1" BORDER="" RULES="cols">
<THEAD>
<TR>
<TD>EST</TD><TD>1am</TD><TD>8pm</TD>
</TR>
</THEAD>
<TR>
<TD>CST</TD><TD>2am</TD><TD>9pm</TD>
</TR>
<TR>
<TD>MST</TD><TD>3am</TD><TD>10pm</TD>
</TR>
<TFOOT>
<TR>
<TD>PST</TD><TD>4am</TD><TD>11pm</TD>
</TR>
</TFOOT>
</TABLE>
<P>
<BUTTON onclick="oID_1.rules=''">No borders</BUTTON>
<BUTTON onclick="oID_1.rules='none'">Exterior border</BUTTON>
<BUTTON onclick="oID_1.rules='all'">All borders</BUTTON><BR>
<BUTTON onclick="oID_1.rules='cols'">Column borders</BUTTON>
<BUTTON onclick="oID_1.rules='groups'">Groups borders</BUTTON>
<BUTTON onclick="oID_1.rules='rows'">Table row borders</BUTTON>
</P>

View live example

Notes Remarks

The value none turns off only the interior borders. To turn off the table borders, set the rules property to , or omit the RULES attribute from the table object.

Syntax See also Related pages Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4