CSS or also Cascading Style Sheets is basically a style sheet language used to describe the presentation semantics of a document written in a markup language. The most common application is to style web pages written in HTML and XHTML. CSS was developed by World Wide Web Consortium (W3C) in the year of 1996. Style sheets have existed in one form or another since the beginnings of SGML in the 1970s. Cascading Style Sheets were developed as a means for creating a consistent approach to providing style information for web documents.
It can also be seen that the language can also be applied to any kind of XML document, including SVG and XUL. It is basically designed to allow separation between document content and its presentation including fonts, colors etc. This separation will improve content accessibility and not only that it provides more flexibility and control in the specification of presentation characteristics, enable multiple pages to share formatting, and reduce complexity and repetition in the structural content.
It can also allow the same markup page to be presented in different styles for different rendering methods, such as on-screen, in print, by voice etc. When the document is linked to a CSS style sheet, the reader will be able to use a different style sheet, perhaps one on their own computer, to override the one the author has specified. Internet media type (MIME type) text/css is registered for use with CSS.
CSS has a simple syntax and uses a number of English keywords to specify the names of various style properties. CSS specifies a priority scheme to determine which style rules apply if more than one rule matches against a certain element. In this cascade, priorities are calculated and assigned to rules, so that the results can be predicted. A style sheet consists of a list of rules. Each rule or rule-set consists of one or more selectors and a declaration block. A declaration-block consists of a list of declarations in braces. Each declaration itself consists of a property, a colon, a value, and then a semi-colon.
CSS has various levels and profiles. Each level of CSS builds upon the last, typically adding new features and typically denoted as CSS1, CSS2, and CSS3. Profiles are typically a subset of one or more levels of CSS built for a particular device or user interface. Currently there are profiles for mobile devices, printers, and television sets. Profiles should not be confused with media types, which were added in CSS2.
CSS is one of the milestone languages developed by W3C. Though it has its set of advantages and disadvantages just like any other developing language, it has still proven to be quite effective and used.
|