CSS Color Property

The Web Book

ABC Global Consulting

This is a paragraph with class="ex".

This is an ordinary paragraph without any color applied through CSS.


CSS Color Property Example Code

HTML CODE .............................................................................. <!DOCTYPE html> <html> <body> <h1>ABC Global Consulting</h1> <p class="ex">This is a paragraph with class="ex".</p> <p>This is an ordinary paragraph without any color applied through CSS.</p> </body> </html> CSS CODE .............................................................. /* Main heading font and background colors set using names */ h1 {color:white;} h1 {background-color:orange;} /* Used RGB values for paragraph with a class */ p.ex {color:rgb(255,201,115); background-color:rgb(255,140,0);} Back