| CSS is used by both the authors and readers of web | | | | beginnings of SGML in the 1970s. Various browsers |
| pages to define colors, fonts, layout, and other | | | | included their own style language which could be used |
| aspects of document presentation. It is designed | | | | to customize the appearance of web documents. |
| primarily to enable the separation of document | | | | Originally, style sheets were targeted towards the |
| content (written in HTML or a similar markup | | | | end-user; early revisions of HTML did not provide |
| language) from document presentation (written in | | | | many facilities for presentational attributes, so it was |
| CSS). This separation can improve content | | | | often up to the user to decide how web documents |
| accessibility, provide more flexibility and control in the | | | | would appear. |
| specification of presentational characteristics, and | | | | As the HTML language grew, it came to encompass |
| reduce complexity and repetition in the structural | | | | a wider variety of stylistic capabilities to meet the |
| content. CSS can also allow the same markup page | | | | demands of web developers. This gave the designer |
| to be presented in different styles for different | | | | more control over site appearance, but HTML |
| rendering methods, such as on-screen, in print, by | | | | became more complex to write and maintain. |
| voice (when read out by a speech-based browser or | | | | Variations in web browser implementations made |
| screen reader) and on braille-based, tactile devices. | | | | consistent site appearance difficult, and users had |
| Similarly, identical HTML or XML markup can be | | | | less control over their web browsing experience. |
| displayed in a variety of styles, 'brands', liveries or | | | | Seeing the need for an improved web presentation |
| colour schemes by using different CSS. | | | | system, Hakon Wium Lie (known today as the CTO |
| CSS information can be provided by various sources: | | | | of Opera Software) proposed Cascading Style |
| Author styles (style information provided by the web | | | | Sheets (CSS) in 1994. Bert Bos was at the time |
| page author), in the form of external stylesheets, i.e. | | | | working on a browser called Argo which used its own |
| a separate CSS-file referenced from the document, | | | | style sheets; the two decided to work together to |
| embedded style, blocks of CSS information inside the | | | | develop CSS. |
| HTML document itself, inline styles, inside the HTML | | | | Unlike existing style languages like DSSSL and FOSI, |
| document, style information on a single element, | | | | CSS allowed a document's style to be influenced by |
| specified using the "style" attribute. | | | | multiple style sheets. One style sheet could inherit or |
| User style a local CSS-file specified by the user using | | | | "cascade" from another, permitting a mixture of |
| options in the web browser, and acting as an | | | | stylistic preferences controlled equally by the site |
| override, to be applied to all documents User agent | | | | designer and user. |
| style the default style sheet applied by the user | | | | Hakon's proposal was presented at the "Mosaic and |
| agent, e.g. the browser's default presentation of | | | | the Web" conference in Chicago, Illinois in 1994, and |
| elements. | | | | again with Bert Bos in 1995. Around this time, the |
| CSS specifies a priority scheme to determine which | | | | World Wide Web Consortium was being established; |
| style rules apply if more than one rule matches | | | | the W3C took an interest in the development of |
| against a particular element. In this so-called 'cascade', | | | | CSS, and organized a workshop toward that end |
| priorities or 'weights' are calculated and assigned to | | | | chaired by Steven Pemberton. This resulted in W3C |
| rules, so that the results are predictable. | | | | adding work on CSS to the deliverables of the HTML |
| Advantages of using CSS include: Presentation | | | | editorial review board (ERB). |
| information for an entire website or collection of | | | | Hakon and Bert were the primary technical staff on |
| pages can be held in one place, and can be updated | | | | this aspect of the project, with additional members, |
| quickly and easily. | | | | including Thomas Reardon of Microsoft, participating |
| Different users can have different style sheets: for | | | | as well. By the end of 1996, CSS was ready to |
| example a large text alternative for visually-impaired | | | | become official, and the CSS level 1 Recommendation |
| users, or a layout optimised for small displays for | | | | was published in December. |
| mobile phones. | | | | Development of HTML, CSS, and the DOM had all |
| The document code is reduced in size and | | | | been taking place in one group, the HTML ERB. Early |
| complexity, since it does not need to contain any | | | | in 1997, this was split into three working groups: |
| presentational markup. | | | | HTML WG, chaired by Dan Connolly of W3C, DOM |
| CSS has a simple syntax, and uses a number of | | | | WG, chaired by Lauren Wood of SoftQuad, and CSS |
| English keywords to specify the names of various | | | | WG, chaired by Chris Lilley of W3C. |
| style properties. | | | | The CSS Working Group began tackling issues that |
| A style sheet consists of a list of rules. Each rule | | | | had not been addressed with CSS level 1, resulting in |
| consists of one or more comma-separated selectors | | | | the creation of CSS level 2, with a first public |
| and a declaration block. A declaration-block consists | | | | Working Draft on 4 November 1997. It was published |
| of a list of semicolon-separated declarations in curly | | | | as a W3C Recommendation on 12 May 1998. CSS |
| braces. Each declaration itself consists of a property, | | | | level 3, which was started in 1998, is still under |
| a colon (:) then a value. | | | | development as of 2005. |
| have been around in one form or another since the | | | | |