You are here:
- Manual
- Development
- Cascading Style Sheets
- Guidelines
Cascading Style Sheets: Guidelines for using CSS
Web developers should separate structure from presentation whenever possible, so using CSS for the site presentation whenever possible is strongly recommended. CSS should be placed in linked external files as much as possible.
Keep structure and design separate as much as possible: use HTML or XHTML for the structure of the site and CSS for its presentation.
Guideline R-pd.1.1
CSS should be placed in linked files and not mixed with the HTML source code.
Guideline R-pd.9.1
Web developers should also bear in mind that pages are to remain accessible if CSS support is lacking. (Obiously, this does not mean that the pages must have look the same as when CSS is supported by the browser.) See also CSS support by browsers.
Pages should remain usable if a web browser does not support CSS.
Guideline R-pd.9.2
“Organize documents so they may be read without style sheets”
The difference between CSS Level 1 and Level 2
CSS Level 1 mainly contains basic rules for the presentation of text and image. The CSS Level 2 specification is an exptension of CSS Level 1. In addition to the rules of CSS Level 1, CSS Level 2 also contains layout rules. CSS Level 2 can be used to move entire blocks of content on the page.
Links and references
CSS Level 3
The specification for CSS Level 3 is currently being developed. Browser support for this new version of CSS is still limited.
Because rules that are not supported by browsers are automatically ignored, it is quite safe to implement rules from the CSS Level 3 specification – or even rules from browser-specific CSS specifications – such as those for Microsoft. Web developers should, however, take into account that they must not expect wide support for this.
Since the CSS Level 3 specification is still being developed and in view of the importance of using open standards, it is recommended to use only those aspects of CSS Level 3 that warrant reasonable browser support.
