CSS Rules
CSS rules are typically applied to html elements. These determine style such as color for example. A rule should state the element you want to modify and the styles that will be applied to the element. A CSS rule is made up of two parts the selector and the declaration. Both parts are necessary for it to work.
Adding styles
There are three ways to add styles to your webpage using CSS. The first is inline styles which are added to a tag using HTML style attributes. The second is embedded CSS styles which are placed in the head of the HTML document. And the third is linked styles which is when you create a separate style sheet and link that to the HTML page.
Rule Naming
The basic rule structure for CSS can be extended. The first way is by naming multiple declarations within a single rule. The second is multiple sectors can be grouped. And the third is multiple selectors can be grouped. These are important to remember when writing CSS to be the most efficient.