Cascading Stylesheets: 5 Reasons To Use CSS by
Hilco van der Meer
Cascading Stylesheets become more and more important in today's
webdesign.
But before you decide to get started using CSS you should know
why CSS is so important and what its advantages are.
1. 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: your 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 web site.
2. 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.
3. 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 you automatically gain is that your HTML code
is much cleaner. So the search engine spider will not have to
separate the junk 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!
4. CSS is compatible with newer browsers
Because more and more browsers are used other than Internet
Explorer on a Windows machine, 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.
5. 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 done 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 PDA's and such.
As you will understand, this adds some great flexibility to the
presentation of your web document.
Conclusion
Cascading Style Sheets are created to make things easier. It
gives you great control of your website and makes your visitors
happy when they are surfing your website.
You are prepared for the future and will gain better search
engine results automatically. Start using CSS to its full potential
today! It will suit you well.
About the Author
Hilco van der Meer is an expert on Cascading Style Sheets. He is
known as the creator of the "How To Master CSS" course.
This course discusses CSS in a fun and easy way. Apart from the
book, he also created CSS training videos for the course. The course
can be found at: http://www.HowToMasterCSS.com
|