Style Properties
At the heart of the CSS 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 length-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