HTML and CSS Reference
In-Depth Information
This is much easier to understand and manage. If you want to change
the numbering style later, you need only change the
<ol>
tag properties,
instead of finding and changing each instance of the
<li>
tag in the list.
You can use these properties in a much more global sense, too. Setting
a list property on the
<body>
tag changes the appearance of all lists in
the document; setting it on a
<div>
tag changes all the lists within that
division.
8.4.9. Table Properties
For the most part, HTML/XHTML browsers render table content using the
same properties that control the rendering of conventional document
content. However, a few special circumstances occur only within tables.
To give authors greater control over these items, CSS2 has added a few
table-specific properties. The popular browsers do not yet support any
of them.
8.4.9.1.
The
border-collapse,
border-spacing,
and
empty-cells
properties
There are two divergent views regarding cell borders within tables. The
first view holds that each cell is an independent entity with unique bor-
ders. The second view holds that adjacent cells share the border side
and that changing a border in one cell should affect the neighboring cell.
To give the most control to authors, CSS2 provides the
border-collapse
property, which lets you choose the model that suits your style. By de-
fault, the value of this property is
collapse
, meaning adjacent cells share
their border style. Alternatively, you can set the
border-collapse
prop-
erty to
separate
, which enlarges the table so that borders are rendered
separately and distinctly around each cell.
If you choose the
separate
model, you can also use the
border-spacing
property to set the spacing between adjacent borders. The default bor-
der spacing is 0, meaning that adjacent cell borders touch each oth-