Style Properties
At the heart of the Cascading Style Sheet specification are 53 properties that let you control how the styles-conscious browser presents your documents to the user. The standard collects these properties into six groups: fonts, colors and backgrounds, text, boxes and layout, lists, and tag classification. You’ll find a summary of the style properties later in this chapter.
Property Values
There are five distinct kinds of property values: keywords, length values, percentage values, URLs, and colors.
Keyword property values
A property may have a keyword value that expresses action or dimension. For
instance, the effects of underline and line-through are obvious property
values. And you can express property dimensions with keywords like small
and
xx-large
. Some keywords are even relational: bolder
, for instance, is an
acceptable value for the font-weight property. Keyword values are not case-sensitive: Underline, UNDERLINE, and underline are all acceptable keyword
values. Keywords also cover such properties as font-family names.
Length property values
So-called length values (a term taken from the CSS standard) explicitly state the
size of a property. They are numbers, some with decimals, too. Length values may
have a leading +
or -
sign to indicate that the
value is to be added to or subtracted
from the immediate value of the property. Length values must be followed
immediately by a two-letter unit abbreviation—with no intervening spaces.
There are three kinds of ...
Get Webmaster in a Nutshell, Second Edition 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.