CSS is the acronym for Cascading Style Sheets, and it is a w3c.org recommendation. CSS is intended to fix some caveats in HTML formatting. HTML has been created to store data in a convenient manner, but not specifically to present it in a visual manner. Further extensions to HTML gave it the ability to perform rendering tasks, and to embed color and rendering information in some HTML tags attributes.
This finally leads to many problems rendering the information stored in the HTML documents:
Each time a color or rendering attribute changes in a set of HTML documents, each of its tag attributes must be changed.
face attribute of the
font tag only allows for one font name, so if this font is not present in the client's browser it uses the default font, but still processes all the tag's attributes. If a developer uses the
My Font font with a size of 8 - that is fine displayed in a browser - the default font with a size 8 will be used if
My Font is not present; and it is not uncommon that the default font with size 8 makes the site impossible to browse.
HTML must be further extended to allow speech based browser for visual impaired as it has no aural attributes to deal with that kind of browsers.
The formatting attributes into an HTML document cannot be changed on a browser basis or to any other media than the web browser; so HTML formatted sites used to look really bad when printed, and were not fully browser independent. When you read in a website "This site have been optimized for this browser and this version with those screen dimensions", actually the webmaster is telling you "This site will be well rendered only in the browser and on the screen I used to develop it".
CSS fixes all those problems and others, allows developers to easily change the entire document style with changes in just one document, to show each browser a different page style improving user's browsing experience, to set rules for speech machines, PDA, mobile phone, TV, print and even terminal output.
One of the best things of CSS is that it is small and easy to learn. Much more easy than learning HTML for example.