What Does Cascading Mean?


There are three types of style sheets that can influence the presentation of an HTML document in a browser. These are

  • Browser style sheets Browsers apply style sheets to all web documents. Although these style sheets vary from browser to browser, they all have common characteristics, including black text, blue links, and purple visited links. These are referred to as default browser style sheets.

  • User style sheets A user is anyone who looks at your website. Most modern browsers allow users to set their own style sheets within their browser. These style sheets will override the browser's default style sheetsfor that user only.

  • Author style sheets The author is the person who develops the websiteyou! As soon as you apply a basic style sheet to a page, you have added an author style sheet. Author styles generally override user styles, which override browser styles. The cascade is shown in Figure 1.1.

Figure 1.1. The three types of style sheets that influence the presentation of a web page.


Cascading means that styles can fall (or cascade) from one style sheet to another. The cascade is used to determine which rules will take precedence and be applied to a document.

For example, rules in author style sheets will generally take precedence over rules in user style sheets. Rules in user and author style sheets will take precedence over rules in the browser's default style sheet.

Where Does CSS Come From?

CSS is a recommendation of the World Wide Web Consortium (W3C). The W3C is an industry consortium of web stakeholders including universities; companies such as Microsoft, Netscape, and Macromedia; and experts in web-related fields.


One of the W3C's roles is to produce recommendations for a range of aspects of the Web. CSS1 became a recommendation in late 1996, CSS2 became a recommendation in May 1998, and CSS2.1 became a recommendation in January 2003.





Sams Teach Yourself CSS in 10 Minutes
Sams Teach Yourself CSS in 10 Minutes
ISBN: 0672327457
EAN: 2147483647
Year: 2005
Pages: 234
Authors: Russ Weakley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net