HTML and CSS Reference
In-Depth Information
The notion of a “cascade” is at the heart of CSS (just look at its name). It
ultimately determines which properties will modify a given element. The
cascade is tied to three main concepts: importance, specificity and source
order. The cascade follows these three steps to determine which properties
to assign to an element. By the end of this process, the cascade has
assigned a weight to each rule, and this weight determines which rule takes
precedence, when more than one applies.
1. Importance
Style sheets can have a few di " erent sources:
1.
User agent
For example, the browser's default style sheet.
2. User
Such as the user's browser options.
3. Author
This is the CSS provided by the page (whether inline, embedded or
external)
By default, this is the order in which the di " erent sources are processed, so
the author's rules will override those of the user and user agent, and so on.
Search WWH ::




Custom Search