How are cascading style sheets used?
CSS may be embedded in HTML code, but it is more commonly stored as a separate sheet, usually some variation of style.css. In a cascading style sheet, you define rules for how each display type is handled. For example, you may have several different heading designs, depending on where they fall in the hierarchy; headings (H1), subheadings (H2) and sub-subheadings (H3). Once you define the rules for how each of these heading types is handled, you can then simply reference the tag in your HTML document and include the content. You tell your HTML page to access the style.css page for instructions on displaying the style, and then if you wanted to use the first heading style, you would simply put Type Your Content Here in your HTML document. The HTML code references the style.css document for rules on how to display the content, and your content comes out in different styles depending on which tag you use and how it’s defined in the CSS sheet. This saves you the trouble of typing a new set