CSS Tutorial: Standards-Based Web Design

by Paul Bohman

Why do they call them cascading style sheets?

They call them cascading style sheets because you can have multiple layers of styles, with the last styles overriding the first styles. It is somewhat like a multi-level ("cascading") waterfall or a series of steps, hence the word "cascading."

a series of square shapes representing layers of styles stacked on top of each other, showing how the more recent styles take precedence over the previous ones

The last style declaration wins. In other words, if you declare a style in your external style sheet (such as setting the background color of all paragraphs to blue), then re-declare the style in the document <head> (setting the background color to green), then again in the inline tags (setting the background color to purple), the paragraphs will be purple. However, users can override all of these with a custom style sheets of their own.

The user is always right

No matter how many times you declare a style, the user can undo your style. The user is the king (or queen) of the world as far as styles are concerned. Users can create their own style sheets with their own preferences. Some users with low vision, for example, require all web pages to appear in high contrast colors and enlarged font. They might set the background color to black, the font size to 250%, and the font color to a light yellow. This is a relatively common combination of styles for people with very low vision.

a series of square shapes representing layers of styles stacked on top of each other, showing how the more recent styles take precedence over the previous ones

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License.