HTML and CSS Reference
In-Depth Information
Because style sheets have different levels of precedence, all three types of style
sheets can be used on a single Web page. For example, you may want some elements of a
Web page to match the other Web pages in the Web site, but you also may want to vary
the look of certain sections of that Web page. You can do this by using the three types of
style sheets.
For a more comprehensive list of CSS properties and values, see the Web site of
the World Wide Web Consortium (w3.org). In addition to an abundance of information
about CSS levels 1 and 2, the W3C site also has extensive information about CSS3, from its
history to its use with browsers today. The Web site also includes many online tutorials for
learning CSS levels 1 and 2 as well as CSS3.
CSS Properties
Tables D-2 through D-30 show the property names, descriptions, and valid values for
various categories of CSS properties. Properties shown with the NEW icon are new to
CSS3. The NEW icon next to a table name indicates that all properties in the table are new
with CSS3. Values listed in bold are the default.
Acceptable Units of Measure
Table D-2 Units of Measure
Property Name
Description
Values
color
A color is either a keyword or a numerical
hexidecimal, RGB, RGBA, HSL, or HSLA color
specification
[keyword]
[#rrggbb]
length
Indicates both relative (em, ex, px) and absolute
(in, cm, mm, pt, pc) lengths
em - relative to size of capital M
of browser default font
ex - relative to small x of browser
default font
px - represents one pixel, smallest
unit of measure
in - one inch
cm - one centimeter
mm - one millimeter
pt - 1/72 of an inch
pc - 1/12 of an inch
percentage
Values are always relative to another value
percentage of width or height
of parent element; if only one
value is given, the second is set
to “auto”
Search WWH ::




Custom Search