Online Reference

 

 

CSS REFERENCE
RAPID TABLES

 

    Home > Web Design > CSS Color

CSS Color

CSS Color Properties

HTML TagCSS PropertyDescription
allcolorset element color
allbackground-colorset element background color
allborder-colorset element 4 borders color

CSS Code Example

/* All tags below will have blue color */

H1 { color: blue }

H2 { color: rgb(0,0,255) }

H3 { color: rgb(0%,0%,100%) }

H4 { color: #0000FF }

CSS Background Color

Example:

H1    { background-color: #333333 }

.code { background-color: #dddddd }

CSS Link Color

Example:

a:link    { color: #0000cc; text-decoration: none; }
a:visited { color: #cc00cc; text-decoration: none; }
a:active  { color: #cc00cc; text-decoration: underline; }
a:hover   { color: #0000ff; text-decoration: underline; }
a:        { background-color: #808080; outline: none; }

CSS Text Color

Example:

BODY { color: black }

P    { color: #0000ff }

H1   { color: #808000 }

CSS Color Names and Hex Codes Table

 black#000000rgb(0,0,0)
 silver#C0C0C0rgb(192,192,192)
 gray#808080rgb(128,128,128)
 white#FFFFFFrgb(255,255,255)
 purple#800080rgb(128,0,128)
 fuchsia#FF00FFrgb(255,0,255)
 maroon#800000rgb(128,0,0)
 red#FF0000rgb(255,0,0)
 olive#808000rgb(128,128,0)
 yellow#FFFF00rgb(255,255,0)
 green#008000rgb(0,128,0)
 lime#00FF00rgb(0,255,0)
 teal#008080rgb(0,128,128)
 aqua#00FFFFrgb(0,255,255)
 navy#000080rgb(0,0,128)
 blue#0000FFrgb(0,0,255)

 


See also

 

© 2006-2008 RapidTables.com