What Is CSS?

Cascading Style Sheets (CSS) is a language for adding style to documents. This might be as simple as change the text color, to as complex as developing an application layout.

CSS is used to style HTML documents, but also XHTML, xml, and SVG. It is used for web pages and web applications but also other places such as for printed media like books and magazines, and also for e-books.

A short history of CSS

CSS was first proposed on October 10, 1994 by Håkon Wium Lie, and the initial CSS1 specification became a recommendation in December 1996 with Bert Bos as co-author. Internet Explorer 3, shipped on August 13th 1996, had support for CSS.

CSS1 gave web developers the ability to do simple styling of content, but it defines things which are still at the heart of the language today. The cascade and inheritance; class, ID, and element selectors; pseudo-classes and pseudo-elements; the concepts of block and inline can all be found in the CSS1 specification.

The CSS2 Specification

CSS2 was published as a First Public Working Draft on November 4th, 1997, the specification added several features to CSS, including:

  • Media Types with the @media rule
  • Paged Media for printed documents
  • CSS for Tables
  • Relative, absolute and fixed positioning
  • Generated Content
  • The :hover pseudo-class among others

CSS2 was far more comprehensive and detailed than the very concise CSS1 specification, and many CSS specifications today refer back to things defined in that specification, or one of the two revisions (CSS2.1 and CSS2.2) of the spec.

CSS goes modular with CSS3

The CSS2 specification was already far larger than CSS1, and CSS3 therefore became modular, in order that a slower moving specification would not hold up a faster moving one in the advance to Recommendation process (TO DO: link to info in specs section). The first CSS3 modules were published in 1999 - Color Profiles, Multiple-column Layout, and Paged Media.

There is no CSS4

CSS3 was essentially everything that came after CSS2.1, therefore things which expanded on features which were already part of CSS2.1, became a Level 3 specification, and for a while that group of specifications was referred to as CSS3. This made no sense once some modules progressed to Level 4, and other modules (e.g. Flexbox and CSS Grid) began life as Level 1. Therefore we tend not to refer to a version of CSS today.

Sometimes it is useful to know that a certain feature was included in a newer level of a specification, as that is likely to impact the maturity of the feature and potentially browser support. However referring to CSS4 is incorrect, as there is no group of modules that are defined as CSS4.

To find out more

The following resources were used while researching this content, and are excellent further reading if you have questions about the history of CSS.