While CSS supports a seemingly endless list of properties, the scheme for setting values is fairly predictable. Table 3-2 describes the most frequently used values.
Table 3-2. Commonly encountered CSS length/size, keyword, and color units
color (hexadecimal, reduced depth)
There are three commonly used units in stylesheets intended for
Pixels are absolute units, equal to one pixel on the user’s screen display; always expressed as an integer.
In digital typesetting environments (including CSS), an em is equivalent to the greatest possible height of a glyph (letter) in the applicable font and size combination. The contemporary definition contrasts with the historical definition: the width of a capital “M” in the font and size of the type to which it is applied as a measurement. This unit is usually expressed with a floating-point value.
Percentage units are computed relative to some baseline measurement, which varies according to property and context. Floating-point percentage values are allowed.