Thursday, August 14, 2008

Advantages of CSS over Presentational Markup

Web pages can be styled using presentational markup (HTML) or CSS (Cascading Style Sheets). Styling using presentational markup is "old school" and has a number of disadvantages. CSS is, technically, the "right" way of styling web pages because (X)HTML is a structural markup language.
Disadvantages of presentational markup:
  • Leads to large, bloated web pages
  • Makes the code of the web page extremely complex
  • Each element has to be styled individually
  • The rendering of the web page is slow
  • Lack of flexibility - once done, no easy way of changing the design
  • Poor accessibility - makes the page less accessible to the blind
  • Results in low search engine rankings
Advantages of CSS
  • Web pages contain only structural markup, therefore small and fast to load
  • Keeps the code of the web page simple
  • A single element can be styled using a single CSS rule no matter how many times they occur
  • Page is rendered quickly
  • Design can be easily changed later
  • Page is accessible to disabled people
  • Results in higher search engine rankings

No comments: