Sunday, January 16, 2011

What is CSS?

CSS essentially separates all formatting related functions into a separate section of the html document or into a completely separate document known as a stylesheet. It is not difficult to think of multiple derived advantages that this has over traditional html.

Firstly and perhaps most importantly, it saves a lot of work. Traditional html formatting meant that the author had to write formatting tags for each line in the document that differed from the format defined in the body tag. This represented a lot of work especially if the author jumped from one style to another very often in the document. The clutter became a real nightmare for authors. Now authors can define classes and ids to format chunks of text without having to rewrite all the tags. At the same time, using external stylesheets allow the author to use the same styles across different webpages again saving a lot of work in terms of formatting if the author wanted all the pages to display in the same style.

Secondly, since there is less “code” to process, pages are smaller in terms of size, pages usually load faster, use less bandwidth – in general it made the web more efficient saving money and time.

Lastly, css allows for far more customization than traditional html. Web designers can let their creativity run wild where they were previously restricted by the html limitations. Some css pages can be equally appealing and produce equal functionality to pages created using javascript or flash both of which are considered to be heavier in terms of coding having security loopholes.

No comments:

Post a Comment