Custom Search

Thursday, January 18, 2007

learning CSS (Cascading Style Sheet) - part 1

What is CSS ? CSS make us simple and effective making the website.

Imagine you've just designed a two hundred page web site for a client (or maybe for yourself) but at the last minute your client (or you) decide the font is a little two small or the typeface should be serif instead of sans-serif? You didn't know how to use cascading style sheets (CSS) so you coded all of the pages with the old-style tag. If you didn't know CSS, chances are you'd have to replace every occurrence of the old tag with the new tag :-(

But if you had decided to write the site with CSS from the get-go, all you would have to do is replace one single line of code in a master file, and your entire site would be rendered immediately in your new style.

That's just one file to upload. That's a lot better than two hundred. Now you can do other things with your time. This is one major reason cascading style sheets are important. CSS makes web site maintenance easier :-)

Cascading style sheets (CSS) have a side effect of improving page load time for your site. Why does it load faster you ask? There is less data to transfer. Normally, a web browser has to download all of your formatting code in each and every one of your pages on your site. With CSS, the style sheet is downloaded once and cached, and every page beyond your first page is shorter and sweeter. Every page that uses your style sheet is also more consistent, because it is derived from an identical style. No more 14 point typeface on page A and 12 point typeface on page B. Just link both pages to one style sheet, and the formatting is automatic.

Cascading style sheets also improve accessibility. If someone has poor eyesight, they can use the advanced feature of a web browser to define their own style. If the can only see 16 point fonts and larger, they can define so in their own personal style sheet. This style sheet can override your defaults, making your site more enjoyable to an even larger audience.

Ok, Get your cup of coffee or green tea, and get ready to learn how to make your web design life a little bit easier. It's time to learn how easy it is to use cascading style sheets...
(to be continued....)

1 comment: