CSS - Grouping

CSS Grouping used to apply styles for same property of several selectors to avoid repeating the same. This way minimize the coding.
Separate each selector with a comma.

Ex: same font color using for paragraph & hyperlinks we can define it as a group by avoiding repeating the same.
   Normal way
      P{
         color : red;
      }

      a{
         color : red;
      }

   CSS Grouping
      p, a {
         color : red;
   }

No comments:

Post a Comment