Cascading stylesheets

That's what CSS is short for. So, what does it mean?

You now know about in-line styles, embedded styles and external stylesheets. You can use all three for one page (there are even occasions where that is a reasonable thing to do but normally not). If you did you could set the style for paragraph text in all three:

Styles cascade down from external to embedded and then in-line. In-line will take priority. Then embedded.

Another part of the cascading concept is that you can add to the styles. You could:

That one paragraph will have three sets of styles. Font family from the external, colour from the embedded and size from the in-line. Font family and colour are cascaded down.

You can also have more than one external stylesheet. In that case the ones listed later override the styles in the first one.

Don't worry about the theory too much as all this is about to become second nature!Practice cascading

submit to reddit Delicious Tweet