NOTICE: This website is no longer updated or supported - as such many of the techniques used to build it may seem antiquated in the modern day. It is preserved for historical reasons only.

HTML XHTML The Complete Reference
home » reference » appendix b » css1 / css2 properties

color


This property sets the color of text. Values can be specified as color names, hex values in three or six-digit format, or red-green-blue (RGB) values (numbers or percentages). For more information on color values, see Appendix E.

Examples


.sunflower {color: yellow;}
#sunburn {color: #FF0000;}
p {color: #FF0;}
#sunburn2 {color: rgb(255,0,0);}
body {color: rgb(100%,100%,100%);}

Browser and CSS Support Notes


CSS1
IE 3, 4, 5, 5.5, 6
Nav 4, 4.5-4.7 6, 7
Opera 4, 5, 6, 7

(X)HTML Elements
CSS Properties
Back: clip Next: content
< Home | About | Chapters | Examples | Errata | Reference | Site Map >