Warning: Undefined array key "StartingPoint" in /customers/f/f/0/safaribears.de/httpd.www/content.php on line 107 Warning: Cannot modify header information - headers already sent by (output started at /customers/f/f/0/safaribears.de/httpd.www/content.php:107) in /customers/f/f/0/safaribears.de/httpd.www/content.php on line 115 Warning: Undefined variable $WEB_ROOT in /customers/f/f/0/safaribears.de/httpd.www/content.php on line 118 Warning: Cannot modify header information - headers already sent by (output started at /customers/f/f/0/safaribears.de/httpd.www/content.php:107) in /customers/f/f/0/safaribears.de/httpd.www/content.php on line 118 Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /customers/f/f/0/safaribears.de/httpd.www/content.php on line 169 CSS Tutorial - Text styles - color
changes the foreground color of an element
div{
color:blue;
color:#CC00FF;
color:rgb(60, 128, 255);
}

The 'color' element doesn't only apply to text, it is the general element for coloring all elements.
It affects the foreground color. Since I am talking right now about fonts and text, let me start with that. You can either use a color name for one out of a list of 16 colors, or if you want more colors, you give the RGB value either in hexadecimal with a leading '#', as seen in the second example ( the first two digits stand for the hex value of Red, the second pair for Green and the third pair for Blue), or (if you don't like hex) you give the single values for Red, Green and Blue as seen in the third example.

Here are the 16 colors:

aqua
black
blue
fuchsia
gray
green
lime
maroon
navy
olive
purple
red
silver
teal
white
yellow

Want to play with it? Enter a name of color. You can also enter hex-values, like FF0000 for red.

You will find pages that use in the source colors like 'teak' or 'light-blue', and it might actually even work, but it might not, since that is not coming from the Standards consortium W3C, but it's just another proprietary gimmick from the 'You can call me monopolist' company with the big blue 'e' in the browser.