According to W3C , CSS is a simple mechanism for adding style (e.g., fonts, colors, spacing) to Web documents. The elaboration of CSS is Cascading Style Sheets. It describes how the markup language will be demonstrated in the screen.
CSS separates the document content from document presentation. This separation improves to write markup language in a clean way. Moreover, it enables to use same design style in various part of the document which reduces the redundancy of writing more style languages.
HÃ¥kon Wium Lie first proposed about CSS in 1994 when he was working with Tim Berners-Lee at CERN. Gijsbert (Bert) Bos also proposed similar type of idea at that time. W3C released first CSS Recommendation (CSS1) in 1996 after much discussion on various mailing list.
HÃ¥kon Wium Lie first proposed about CSS in 1994 when he was working with Tim Berners-Lee at CERN. Gijsbert (Bert) Bos also proposed similar type of idea at that time. W3C released first CSS Recommendation (CSS1) in 1996 after much discussion on various mailing list.
CSS have simple syntax. A CSS rule-set consists of a Selector and a Declaration Block. Selector points to the markup language (i.e HTML element) element and Declaration block contains a list of declaration in braces. Each declaration consists of property and value and separated by colon. Each declaration ends up with semicolon. Markup language elements are may be specified with attributes like Id or Class.
Example:
Suppose H1 is a HTML tag and the document can be written as:
<h1> Sen Computing </h1>
It can be associated with CSS ----
<h1 style="color: red; font-size: 15px;"> Sen Computing </h1> [Inline stylesheet]
or
h1{color: red; font-size:15px} [External stylesheet]
External stylesheet can be written in file that have .css extension and can be linked up with the HTML file.
The current version of CSS is CSS3.