Email is Alive

3Jan/090

Using CSS to Build and Manage Websites

Understanding how CSS can revolutionize website development is key to maintaining large websites as well as structuring smaller websites to grow with minor pains. The benefits to CSS compared to standard HTML development is beyond comparison.  I’ll give a few reasons in this post on how I’ve become a believer in CSS structured websites, and how CSS has helped me to create above and beyond HTML’s limits.

The first thing that CSS has done is cut the “code bloat” out of common development. The markup for a common site can be diminished up to 50% allowing for easier management, readability and SEO capabilities.  Standard HTML inline styling is a thing of the past; a proficient developer in 2009 should have the knowledge to code and manage an entire websites’ styling and formatting from a single stylesheet.  There are instances and reasons why a developer may need more than one stylesheet, but we can get into that on a later date. The foundation of this post is just to explain the power of CSS over the standard inline HTML method.

Using a single stylesheet, one selector and a few declarations a developer can harness the basic layout of a website  (height, width, background color, font type, etc) with an unlimited amount of pages. Using the standard inline HTML styling markup, each page would require that code to be duplicated over and over on each individual page in order to create that same effect. The difference in file size between these methods over time is amazing.  Properly coded CSS will allow a developer to manage a website to control all aspects of a websites styling from one sheet and make global changes.

Another reason CSS trumps inline HTML styling is the ability to layer and float aspects of a design.  BACK IN THE DAY…website development required developers to cut and carve up the initial design of a website’s imagery into cubes and rectangles and then puzzle piece them together. Not so anymore.  CSS will allow layering of images and the floating of images to certain points inside the visitors’ browser window. While the cutting and carving of the initial design is still needed, a complete carving of the design into HTML friendly cubes and rectangles is no longer needed. Saving time, allowing tweaks to the design with minor code/image changes, and also giving JavaScript like effects to the website without the unfriendly coding and implementation of JavaScript.

Finally, the value that I will close with is the SEO friendliness of CSS compared to standard HTML. I’ll list out a few reasons that make the clear cut differences in using CSS for SEO purposes:

1. Page Load time - this can play a key factor in the SEO friendliness of a website. Google actually will time the page load of a website to help create rankings against the idea of user friendliness. This also cuts down bandwidth usage and bounce rates for potential visitors.

2. Code Bloat - Search Engines use spiders/bots to read through the pages of a website. The more code on the website the longer it takes to spider. Therefore, using CSS to reduce the markup on the website can increase spider times and give the bots an easier view into the content of the website. This will also help the site to have more content towards the top of the website, increasing ranking capabilities.

3. Reduction of unfriendly JavaScript code - Search Engines don’t read this type of code. Developers use this code for certain effects on a website. The main issue here is the use of JavaScript to add functionality to menu’s and links. This is a very bad practice and if used can cripple the SEO capabilities of a website. CSS can be used to replace this code and allow Search Engines to properly index and cache the important pages of the website.

There are many more reasons for using CSS and managing websites with this code, I’ll be visiting these issues in depth more in the coming posts.