STYLE SHEETS AND HTML STYLE RULE
To apply a style, CSS uses the HTML document tree to match an element, attribute, or value in an HTML file. For an HTML page to properly use CSS, it should be well-formed and valid, and possess a valid doctype. If these conditions are not met the CSS match may not yield the desired results.There are two types of CSS statements: rule-sets and at-rules. A rule set, also known simply as a rule, is the more common statement, and consists of a selector and a declaration block, sometimes simply called a block. The selector can be an element, class, or ID, and may include combinators, pseudo-elements, or pseudo-classes.