What's new
HTML Forums | An HTML and CSS Coding Community

Welcome to HTMLForums; home of web development discussion! Please sign in or register your free account to get involved. Once registered you will be able to connect with other members, send and receive private messages, reply to topics and create your very own. Our registration process is hassle-free and takes no time at all!

What Is The Concept Behind CSS?

Virtual Assistant

New member
The concept behind CSS (a.k.a. cascading style sheets or style sheets) is really simple. CSS allows you to create a single document of code, similar to an HTML file, that lets you specify the colours, fonts, backgrounds, etc. of a web page. The CSS file is then linked to from the web page(s) that you want to have the same styles that you specify.

CSS allows you to make changes to all of the web pages that link to the CSS file at once by changing a style in the style sheet, instead of having to manually change 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 large or multiple websites. 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 to
add rollover effects to links
control the spacing between letters, lines, margins, web page borders
specify the units such as centimetres, pixels, points and more
hide content from certain web browsers in certain situations. An example of this is when you have some content that you want to appear only on your web pages, but not in print.

Some Benefits of CSS

Your web pages load faster because there is less code to transfer
There is less code to type
It is easier to have a consistent look and feel to your entire website
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.
 
Top