The CSS syntax consists of a set of rules that directs how to apply it.
CSS rule have three parts:
- selector - selectors tells which element is to be styled.
- property - property defines the type of change or style we want.
- value - value provides information about what kind or how much change we want.
To make properties and values more readable we can write like written below:
In case you want to apply the same style for multiple selectors then it is not necessary to define CSS property for each selector. Just separate selectors with a comma and define only once.
CSS Property with multiple values
Some of the CSS properties have multiple sets of values which are mentioned at a time.Example:border property,shadow property,font property etc.