CSS - Colors

Defining Color values of the CSS as same as the HTML. You can define colors 3 ways

  1. color : white
  2. color : rgb(0, 0, 0)
  3. color : #000000
Font Color
We can specify the style for font color by using "color" property for the each selector
Ex : 
body{
   color : yellow;

Background Color
We can specify the style for Background color by using "background-color" property for the each selector
Ex : 
body{
   background-color : orange;


Ex:

p{
   background-color : orange;
   color : red;

a{
   background-color : grey;
   color : white;

h1{
   background-color : olive;
   color : maroon;

1 comment: