CSS Grouping and Nesting Selectors
CSS Grouping: this is a technique used to reduce
code redundancy and write the same style in different elements, concise easy-to-follow
code. Separate each selector with a comma.
Example:
h1,h2,h3{
background-color: #09bef0;
color: #000;
font-size: 16px;
}
Nesting Selectors: Gives the ability to nest one style rule inside another,
with the selector of the child rule relative to the selector of the
parent rule. Comparative behavior already required a
CSS per processor. It is possible to apply a style for a selector within a
selector.
Example:
ul li{
font-size:16px;
}
Leave a comment
No Cmomments yet