Latest Post

CSS Text/Font Color

How to set text color or font color in html using style sheet?

Colors for html font/text can be set using the css tag "color".
It accepts values in three formats

a) Color name
b) rgb(x,y,z) where x,y,z is red,green,blue
c) #xxyyz where xx,yy,zz points to hexadecimal(hex) values of red,green,blue

Examples : 

 <div style="color: green;"> color name </div>  
 <div style="color: rgb(120,120,120);"> color using rgb(x,y,z) </div>  
 <div style="color: #00000;"> color using hex values</div>  

Result :

color name
color using rgb(x,y,z)
color using hex values