CSS color units
Color units
The value of color can be a color name (keyword), a RGB value or a hexadecimal value. We will see an example using the same color but specified in different ways.
Here is the css file (say color-unit.css):
This stylesheet specifies same color in three different ways (color name, hex value and rgb value ).
Here is the html file (say color-unit.htm) to which the stylesheet above is applied:
Here is how it will look:
Before go in more detail about css color property,in the next page we will see different ways of specifying color
View this example of CSS color unit in a different browser window
Previous: CSS (foreground) color
Next:
CSS color inherit