Brief theory of CSS

What is CSS

CSS stands for "cascading style sheets". By aid of a CSS file the content and the layout are separated. The content of a webpage is in an HTML- file and the layout of the webpage is defined in the CSS file.

This separation of content from layout results partly in the advantages of CSS listed below.

Advantages of CSS:

  • Widely supported by modern browsers but not by older browsers
  • CSS files make it easy to change the layout of a web page
  • Increases usability by encouraging liquid design
  • Keeps the HTML-/text ratio at a low level thus decreasing load time
  • Smaller HTML- files load faster
  • Allows the display of main content first while the graphics load afterwards
  • Separating style from content
    • Makes modifying the content easier
    • The same page can be displayed differently for different media
      • e.g. on the screen, for the print, for smaller displays
    • Is good for visitors who prefer to view only the content of a web page
      • e.g. blind or partially sighted people who might use a screen reader

HTML-code

HTML.PNG