• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

The COLOR Property

The COLOR CSS property simply sets the color to be displayed for the HTML tag with which it is associated. It can take any of the color value types that can be associated with CSS. For example, it can take a standard color name (such as "BLUE") or a hexadecimal color value (such as "#0000FF", which is blue), both of which are standard ways of setting color values in HTML. In CSS, you can also specify color using a "compressed" hexadecimal color value (such as "#00F", which is blue). You can also use a three-digit RGB ("Red Green Blue") color value (where RGB(0,0,255) is blue), and a three-digit RGB percentage color value (where RGB(0%,0%,100%) is blue).

COLOR works in the same way as the COLOR attribute does with the <FONT> tag or a number of other HTML tags. The following code displays HTML and CSS code that produce the same results, which can be seen in Figure 10-1:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint