By Bryan McCaffrey
The use of Cascading Style Sheets have become a critical component of web design. In this post we’ll discuss why CSS is so important and what its advantages are. Here are the Top Five.
- The content is separated from the design – Because you are able to create a separate Stylesheet and link it to all your webdocuments, you have great control over how your website looks. So if you want to change a certain aspect of your page, you only need to alter one file: the Stylesheet! This Of course, generates some great flexibility. This flexibility is not available when your website is using tables for layout, inline font tags or inline defined colors. A single CSS file can contain positioning, layout, font, colors and style information for an entire website.
- You site uses less bandwidth and loads faster – Because stylesheets are so lightweight, your website will load much faster. The main reason is because you do not need table layouts anymore for the positioning of elements. Since text loads really really fast your website will be visible in a flash. This means that visitors will be happier when surfing your website. They only have to download the Stylesheet once, and it’s automatically reused for every page. So the only thing that needs to be loaded is the actual content. On average, a website will load five to ten times faster if it makes use of cascading style sheets
- Your website will automatically gain better search engine results – With CSS, you can position any element, anywhere you want. So if your menu is at the bottom of your HTML document, you can bring it up using absolute positioning. The reason this is useful is to make sure the search engine spiders pick up the main content first. Another advantage gained is that your HTML code is much cleaner. So the search engine spiders will not have to separate messy code from the real content. So make sure you put your logo text and your menu at the bottom of your HTML document at put it at the top using CSS.
- CSS is compatible with newer browsers – You need to be sure that your website is accessible by all major and newer browsers. By using webstandards, defined by the w3c, you are making sure your content is viewable in the future. Because there are so many browsers these days, it is impossible to test your website in all these browsers on different configurations. Coding to standards is then the only practical solution.
- CSS can be used to display the same content on different media – Because you are able to define different stylesheets for different media, you have great flexibility in presenting your content. The printer for example, is a medium on itself. If someone prints out your website, you will be able to modify the look of it. Add an extra black and white logo, remove the advertisements and change the colors to black and white values. It’s all performed easily by using cascading stylesheets. And the best thing is, visitors do not even have to know you created a new Stylesheet especially for the printer. Stylesheets can also be created specifically for mobile devices. With the coming wave of mobile search and commerce, maybe it’s time to CSSify your site.