The Concept Behind CSS

What is the concept behind CSS?

The concept behind CSS (aka cascading style sheets or style sheets) is really simple. CSS allows you to create a single document of code corresponding to an HTML file, which lets you specify the colors, fonts, backgrounds, etc. of a web page. CSS file is then linked to this web page (s) you want the same styles that you specify.

CSS allows you to make changes in all pages that link to the CSS file at once by changing a style in the stylesheet instead of having to manually switch every style in every HTML file.

If CSS did this and only this, they would save you a lot of time to say the least, especially if you have a large or multiple sites. This alone is worth learning CSS, however, style sheets allow you to do this and much more.

CSS also allows you to:

Position text and graphics precisely where you want

Add rollover effects to links

Control spacing between letters, lines, margins, borders website

Specify the units such as centimeters, pixels, points and more

Hide content from certain browsers in certain situations. An example of this is when you have some content that you want to be shown only in your web pages, but not in print.

Some advantages of CSS

Your web pages load faster because there is less code to transfer

There is less code to write

It is easier to have a consistent look and feel throughout your site

Updating and maintaining websites is much easier and less time consuming

In the end, CSS can save you a lot of time and effort and is very easy to learn.