CSS 2
CSS 2
Example:
h1.demo { color: red; }
=> It is applied to h1 element with class="demo" only.
Html element can refer more than one class also.
Example:
<h1 class="demo test">
Grouping Selectors:
1) Grouping Multiple Elements Selector
=> It selects the more than one html elments with the same style
defintion.
Example:
h1, h2 { color: red; }
2) Grouping All Elements Selector
=> It selects all html elements. It is also called as Universal Selector.
Example:
* { color: red; }
By