What is CSS?

CSS is used by both the authors and readers of webbeginnings of SGML in the 1970s. Various browsers
pages to define colors, fonts, layout, and otherincluded their own style language which could be used
aspects of document presentation. It is designedto customize the appearance of web documents.
primarily to enable the separation of documentOriginally, style sheets were targeted towards the
content (written in HTML or a similar markupend-user; early revisions of HTML did not provide
language) from document presentation (written inmany facilities for presentational attributes, so it was
CSS). This separation can improve contentoften up to the user to decide how web documents
accessibility, provide more flexibility and control in thewould appear.
specification of presentational characteristics, andAs the HTML language grew, it came to encompass
reduce complexity and repetition in the structurala wider variety of stylistic capabilities to meet the
content. CSS can also allow the same markup pagedemands of web developers. This gave the designer
to be presented in different styles for differentmore control over site appearance, but HTML
rendering methods, such as on-screen, in print, bybecame more complex to write and maintain.
voice (when read out by a speech-based browser orVariations 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 beless control over their web browsing experience.
displayed in a variety of styles, 'brands', liveries orSeeing 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 webSheets (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 thedevelop CSS.
HTML document itself, inline styles, inside the HTMLUnlike 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 anstylistic preferences controlled equally by the site
override, to be applied to all documents User agentdesigner and user.
style the default style sheet applied by the userHakon's proposal was presented at the "Mosaic and
agent, e.g. the browser's default presentation ofthe 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 whichWorld Wide Web Consortium was being established;
style rules apply if more than one rule matchesthe 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 tochaired 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: Presentationeditorial review board (ERB).
information for an entire website or collection ofHakon and Bert were the primary technical staff on
pages can be held in one place, and can be updatedthis aspect of the project, with additional members,
quickly and easily.including Thomas Reardon of Microsoft, participating
Different users can have different style sheets: foras well. By the end of 1996, CSS was ready to
example a large text alternative for visually-impairedbecome official, and the CSS level 1 Recommendation
users, or a layout optimised for small displays forwas published in December.
mobile phones.Development of HTML, CSS, and the DOM had all
The document code is reduced in size andbeen taking place in one group, the HTML ERB. Early
complexity, since it does not need to contain anyin 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 ofWG, chaired by Lauren Wood of SoftQuad, and CSS
English keywords to specify the names of variousWG, 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 rulehad not been addressed with CSS level 1, resulting in
consists of one or more comma-separated selectorsthe creation of CSS level 2, with a first public
and a declaration block. A declaration-block consistsWorking Draft on 4 November 1997. It was published
of a list of semicolon-separated declarations in curlyas 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