Sunday 8 November 2009

3.6 CSS

Cascading Style Sheets are a means of describing the aesthetic and stylistic aspects of a web-page using defined syntax to instruct a browser how to display the contents of a page. For example the font type, size, colour and the background colour and layout.

Style sheets bring efficiency to web design by being applicable to any number of documents. A whole website can reference the same CSS and adhere to the same stylistic rules, giving it a distinct aesthetic feel. The term ‘Cascade’ refers to the fact that numerous style sheets can be referenced in the same document and the browser will read the sheets in order so earlier sheets will be successively overwritten by later ones. Cascading Style Sheets can be included in an HTML document as an external CSS file to which the HTML points using the link tag, included using the style tag or included directly in an element via the style attribute.

Pros of Cascading Style Sheets:
  • Separate style from content so HTML remains legible and accessible to all users (eg, visually impaired users can use screen readers or apply different style sheets to the content)
  • Make it easy to change the look of webpages
  • Can be applied to any number of documents improving efficiency as code only has to be written once
  • Reduce network traffic, as if the same sheet is applied to numerous pages it is only downloaded once

Cons of Cascading Style Sheets:
  • Different browsers treat some of the styling instructions in different ways
  • Earlier versions of Internet Explorer don’t support CSS well
Examples of Cascading Style Sheets:
here , here and here are examples of this blog post using different CSS's.

No comments:

Post a Comment