Sunday, 12 August 2012

css background-color property tutorial


Introduction of Css Background-Color property


css background property is used to change background of html tag.
  Syntex :
    selector
    {
      background-color :color-name or color-value;
    }
 
Background-color value can be in following way
  1. Direct color-name : We can use direct color name(red,green).
        Syntex :
        selector
        {
          background-color :red;
        }
        
  2. Using Hash value :We can use hash value(#aabbcc)
        Syntex :
        selector
        {
          background-color :#aabbcc;
        }
        
  3. Using RGB combination : We can built color using rgb cobmination
        Syntex :
        selector
        {
          background-color :rgb(10,20,30);
        }
        
  4. Example
        Syntex :
        selector
        {
          background-color :red;
        }
        
    Click to practice online example

No comments:

Post a Comment