Name
rules — NN n/a IE 4 DOM 1
Synopsis
Read/Write
Where (if at all) interior borders between cells are rendered by the
browser. In addition to setting the table to draw borders to turn the
cells into a matrix, you can set borders to be drawn only to separate
borders, columns, or any sanctioned cell grouping
(THEAD, TBODY,
TFOOT, COLGROUP, or
COL). The BORDER attribute must
be present—either as a Boolean or set to a specific border
size—for any cell borders to be drawn. Do not confuse this
property with the rules[] collection of
styleSheet objects.
Example
document.all.myTable.rules = "groups"
Value
Any one case-insensitive rules constant (as a string):
-
all Renders borders around each cell
-
cols Renders borders between columns only
-
groups Renders borders between cell groups as defined by
THEAD,TFOOT,TBODY,COLGROUP, orCOLelements-
none Hides all interior borders
-
rows Renders borders between rows only
Default
None (when BORDER=0); all (when
BORDER is any other value).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access