HTML and CSS Reference
In-Depth Information
Color Format
Description
Examples
Specification-defined
named colors
There are 17 defined colors under CSS
2.1. Each is listed here with its six-digit
hex form equivalent.
body {font-family:
Arial; font-size: 12pt;
color: red;}
maroon ( #800000 )
red ( #ff0000 )
orange ( #ffA500 )
yellow ( #ffff00 )
olive ( #808000 )
purple ( #800080 )
fuchsia ( #ff00ff )
white ( #ffffff )
lime ( #00ff00 )
green #008000 )
navy ( #000080 )
blue ( #0000ff )
aqua ( #00ffff )
teal ( #008080 )
black ( #000000 )
silver ( #c0c0c0 )
gray ( #808080 )
Note there is a slight difference here
between CSS colors and HTML colors,
but in reality HTML colors, including
ad hoc color names, are commonly
supported. See the previous section
“Nonstandard Color Names and
Numerical Equivalents” for more
information.
Commonly
supported named
colors
Browsers support a wide range of named
colors like mintcream . See the previous
section “Nonstandard Color Names and
Numerical Equivalents” for a complete
list of these extended colors.
#gap {color: khaki;}
System Color
Names
CSS 2 introduced named colors,
a feature that allows Web colors to be
matched to an operating system's color
use. A complete list of the allowed
values and their meanings is found in
Table C-5. While these names are
commonly supported, there is some
concern that they will not be supported
in CSS3.
.formLabels {color:
CaptionText;}
input[type="button"]
{background-color:
ButtonFace;}
T ABLE C-4 CSS Color Values
Search WWH ::




Custom Search