Cascading Style Sheets (CSS)

CSS is the standard recommended by the World Wide Web Consortium (W3C) for controlling style (e.g. fonts, colors, spacing, layouts) on Web pages.

Using style sheets allows authors the power to control the presentation of Web files without changing HTML pages. The HTML tags are given a style attribute that is defined in the style sheet file, which allows for great flexibility in presentation across browser platforms. In general, developers should aim to separate content from presentation as much as possible on all web pages. Proper separation is recommended because it has three major advantages in:

  1. Increase the longevity of your website. Redesigning a web site can be time consuming and costly; so why set yourself up for this kind of experience? Many designers will use non-standard practices, such as tables structures to set up layouts. These non-standard practices may seem more convenient at the moment, but a future version of a browser will likely not be so tolerant of these shortcuts. Don't use shortcuts; instead, use the standard. It will save time and money by increasing the how long your web site will last without breaking due to browser or other technology changes.
  2. Make your website more accessible to all users and user devices. It is estimated that 15% of all web users have some a disability that requires web sites to adhere to accessibility standards. Government legislation has required websites to be accessible to users with disabilities. Browsing devices that assist people with disabilities, such as an aural browser, are especially dependent on the best use of CSS styles. Without CSS you may be loosing 15% of your total audience.
  3. Allow you to update and maintain your website with ease. Properly implemented, CSS styles allow changes to be made in one file that take effect globally across your entire website instantaneously. Imagine how many hours of maintenance time this can save.
  4. Cleaner code. If you ever had to make changes to another person's sloppy, disorganized code, you will appreciate that CSS provides for a much more streamlined structure and organization. Again, this can save hours in working through changes to a web site and it makes for faster downloads and saves on bandwidth usage.
  5. Better search engine performance. Less code on html pages means increasing the proportion of content to code, and often it will push key content closer to the top of the source code. This can mean a significant improvement in some search engines. Recently, after we re-coded a web site in CSS, the site traffic nearly tripled. Of course, not every site will experience such dramatic performance increases, but better coding will generally result in better search engine performance.

So why does it seem that CSS is so uncommonly used? Well, it is actually used by a great number of Web sites, but not to the extent that it could be used, and not as much as we can expect it to be used in the future. Here’s a little history to help put all this in perspective:

When Cascading Style Sheets Level 1 (CSS 1) was approved by the W3C in 1996, it was intended to provide the standard solution to formatting Web pages. CSS 1 would allow coders and designers to work closer together to produce cleaner HTML and better designs. Unfortunately the browsers used to interpret CSS under-delivered, which meant those who tried to follow the recommended standards had a well designed standard with little support for it. The result was that Web developers used CSS 1 to do only those elements of CSS that were broadly supported by common Web browsers and used other techniques (usually not W3C recommended) to achieve the desired style results. A good example of this is using tables to control layout and design (html tables were created for tabular data layouts - not graphic design control).

Subsequently, when CSS 2 was recommended in 1999, many developers who were not impressed with CSS 1 didn't consider CSS 2, despite the fact that it is much more powerful than its predecessor and that the problem was not with CSS 1 but with the browsers' ability to accurately interpret the language.

Today we have many new browser improvements in support of the CSS standards. Newer browsers are now in near full support of CSS 1 and working toward full support of CSS 2. There are still bugs to work out, but browser support has drastically improved over the past couple years and Web developers can now more confidently develop Web sites more closely to the recommended standards.

Journey Internet has CSS trained people on staff with years of experience. Call us today for a consultation - 719-638-9925.

Here's a few CSS resources:

W3C on CSS
W3 Schools
CSS Zen Garden
  c.1996-2008 Journey Internet Inc
  Site Map
  Policy Statement - P3P Compliant