HTML and CSS Reference
In-Depth Information
Isn't it about time we talk about the “cascade”?
Well, well, we're quite far into this topic (457 pages to be exact) and we still haven't
told you what the “Cascade” in Cascading Style Sheets is all about. Truth be told, you
have to know a lot about CSS to fully understand the cascade. But guess what, you're
almost there, so wait no more.
Here's just one last piece of information you need to understand the cascade. You
already know about using multiple stylesheets to either better organize your styles
or to support different types of devices. But there are actually some other stylesheets
hanging around when your users visit your pages. Let's take a look:
First, there are all
the styleshee ts you've
written for your page.
N ote that t here is a wa y for a rea der
t o actually o verride you r styles. To do
t hat he puts “!importan t” at the e nd
o f a propert y declarati on.
B ut som e brow sers a lso allo w user s
t o creat e thei r own styles for
H TML elemen ts. If your st yleshee t
The author
(that's you!)
d oesn't define these styles , the
u ser's st yleshe et is u sed ins tead.
A nd finally, you already
k now that the browser
i tself maintains a set of
d efault styles that are
u sed if you don't define
t he styles for an element.
T hese are also the styles
t hat are used if you don't
h ave any author or reader
s tylesheets.
The reader
(your users)
The browser
Search WWH ::

Custom Search