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
, orCOL
elements-
none
Hides all interior borders
-
rows
Renders borders between rows only
Default
None (when BORDER=0
); all
(when
BORDER
is any other value).
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.