Understand the Role of CSS
Cascading Style Sheets (CSS) manage web page presentation and govern how pages look and behave when on display to users (or being printed to paper or listened to in a text-to-speech converter).
CSS is another markup language that mixes special symbols and keywords to define rules for handling specific HTML elements (and even specific instances of HTML elements when “special handling” is needed). CSS is best understood as a tool to manage formatting, layout, and behavior on web pages.
CSS offers an incredible array of presentation controls, including positioning and layout of document elements, identification and assignment of colors for text and backgrounds, and selection and manipulation of specific typefaces, called fonts, for textual information.
CSS provides methods so that a single page of markup can be presented in different styles for different forms of rendering, so that a document can be tweaked and tuned for delivery on a screen, a printed page, by voice, or even on a Braille-based tactile device.
When an author builds a web page, he or she can define a style sheet for that document. Nevertheless, the reader’s web browser can override its definitions with a different style sheet if the reader so chooses.
CSS defines a priority scheme, called the cascade, that defines which style rule should be applied to individual HTML elements in a document. Such priorities or weights are calculated to apply to style rules so that results are predictable and repeatable.