Introduction to CSS

Cascading Style Sheets (CSS) define how to display XHTML. The XHTML tutorial stressed the importance of separating content from style. XHTML simply codes the structure and content of the web page. CSS provide a powerful technique for determining the presentation of a webpage on a display and/or device.

Although CSS techniques can be used within a web page to perform styling at the level of the whole page and even down to the level of an individual element, we will avoid this use. The power of CSS is in their ability to control the presentation of all the pages in a website. Multiple style sheets are allowed and the combined effect will be applied to the page by cascading the effects of each in turn.

The WWW Consortium standards for CSS versions 1, 2 and 2.1 provide a comprehensive, unambiguous, definition of CSS. However, it is recommended that you become familiar with basic CSS from this tutorial and the W3Schools CSS Tutorial before trying to dig into the standard. The W3 standard also refers to HTML throughout, and consequently uses tags in uppercase. The standard works equally well with XHTML, but you must use lower case elements in your style sheet. CSS version 2.1 is standardised and all current browsers support it. However, you are recommended to take care if you use it on live projects as its implementation varies from browser version to browser version. Also, some browsers interpret the CSS specification in a non-standard way. W3Schools provide a compatibility list for CSS2.

Valid XHTML 1.0! | Valid CSS! | WCAG Approved AA
Page design by: John P Scott - Hosting with: Netcetera