What is CSS?

CSS means "Cascading Style Sheet". The CSS document has extension .css. A CSS document is used to define the styles (look and feel) of a HTML document. The styles can includes layout design, fonts, colors, borders, sizes, padding, margin and many more properties of all HTML elements. CSS is supported by all web browsers including mobile web browsers.

CSS is very useful to control the presentation of a HTML document. It can be used all programming lamguages like JSP, asp.net that outputs web pages.

Benefits of CSS

Reusability
When styles are saved in a css file, the same css file can be used on all web pages in a website. This is very useful as all pages can be given the same look and feel using a single css document.

Maintenance
Since all style related information is on a css document used on multiple pages, it is much easier to maintain the code and re-apply any changes.

Global Standards
It is a good practice to use all style information on CSS documents instead of hard coding the styles within the HTML attributes.

Supported on all devices
Keeping style in CSS documents produces cleaner HTML. On different browsers the same HTML but different CSS can be supplied making device compatibility easier.