HTML and CSS Reference
In-Depth Information
sets all the background image and color properties at once, resulting in
a marble image on top of a blue background (blue showing through any
transparent areas). The image repeats vertically, starting from the cen-
ter of the content display area, and does not scroll when the user scrolls
the display. Notice that we include just a single position value ( center ),
and the browser uses it for both the vertical and horizontal positions. The color property
The color property sets the foreground color for a tag's contentsthe col-
or of the text lettering, for instance. Its value is either the name of a col-
or, a hexadecimal RGB triple, or a decimal RGB triple, as outlined earlier
in section . The following are all valid property declarations:
color: mauve
color: #ff7bd5
color: rgb(255, 125, 213)
color: rgb(100%, 49%, 84%)
Generally, you'll use the color property with text, but you may also
modify nontextual content of a tag. For instance, the following example
produces a green horizontal rule:
hr {color: green}
If you don't specify a color for an element, it inherits the color of its par-
ent element.
Search WWH ::

Custom Search