Karmabunny Web Design: Articles & links

Articles & Links // Articles

CSS (Cascading Style Sheets) in Website development
- what's the big deal?

So, you keep seeing references to CSS in your favourite blog or forum, or maybe you've overheard a couple of IT guys discuss it in hushed and reverential tones.

Over the last couple of years the buzz around CSS (Cascading Style Sheets) and its importance to the future of developing a set of workable web standards has been loud and proud. Indeed there are many web developers (myself included) who rate their success or failure on a given project by how clever or elegantly simple their use of CSS was.

What's all the fuss about? What is CSS and why should I care?

CSS is a complimentary language that allows a web developer a greater amount of control over the way in which html (the foundation language that web pages are constructed in) elements are displayed. That is, it can make web pages look real pretty. This might be something as simple as saying 'please make all my headings orange' or as complicated as creating a complete page layout template.

Ok, but there's always been great looking websites out there, so why is this method any better than those used in the past?

Well, when html was created it was meant to be predominantly a structural language that allowed content (text, images etc.) to be tagged so that it had some sort of meaning to whatever device was viewing it. So a 'H1' tag tells a web browser that 'this is my most important heading'.

The problem is that no one really thought (or cared) too much about how to make this content look good. So for years web developers have been squeezing the last drops of style out of html by using tricks and hacks not originally meant for the language. By handling all of the stylistic choices, CSS resolves this indentity crisis and lets html be just what it's always wanted to be - a structural mark-up language.

Once again I hear you mutter: "So...(?)".

Well, apart from the enormous sense of well-being it gives me to create a beautiful site using a minimum of complicated html, the real-world benefits of using CSS during a website's construction phase are:

  • Increased Accessibility: using CSS allows you to be more strict about the quality of your html which means it will work well across multiple platforms like mobile internet devices and (importantly) screen readers for the vision impaired.
  • Google will love you: your site will have cleaner and more meaningful html because you have removed all of the stylistic markup from the code (CSS is handling this separately). For this, Google will reward you with better indexing and a higher ranking (honest!).
  • Faster Loading times: your code will be leaner and your site will load faster.
  • Easier website maintainenance: because your style is kept in a separate file (a Cascading Style Sheet), changing the colour of (eg.,) all of the links throughout your site can be as simple as changing 1 six digit code in one spot! You never have to touch the html at all.

There is a lot more I could say about the virtues of CSS, but to summarise I would say that it is a very important part of the future of the web.

Indeed, the World Wide Web Consortium (w3.org) cites CSS as one of the key technologies that will drive the web to a level of accessibility where everyone (regardless of culture, abilities, etc.), everywhere (from high to low bandwidth environments), will have access to the web on everything (devices ranging from personal computers to mobile devices and appliances).

Pretty cool huh?