20 Facts About CSS


CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.

FactSnippet No. 702,815

CSS is designed to enable the separation of presentation and content, including layout, colors, and fonts.

FactSnippet No. 702,816

CSS has rules for alternate formatting if the content is accessed on a mobile device.

FactSnippet No. 702,817

CSS specifications are maintained by the World Wide Web Consortium .

FactSnippet No. 702,818

CSS has a simple syntax and uses a number of English keywords to specify the names of various style properties.

FactSnippet No. 702,819

In CSS, selectors declare which part of the markup a style applies to by matching tags and attributes in the markup itself.

FactSnippet No. 702,820

CSS lets authors move much of that information to another file, the style sheet, resulting in considerably simpler HTML.

FactSnippet No. 702,821

CSS can define color, font, text alignment, size, borders, spacing, layout and many other typographic characteristics, and can do so independently for on-screen and printed views.

FactSnippet No. 702,822

CSS defines non-visual styles, such as reading speed and emphasis for aural text readers.

FactSnippet No. 702,823

One of the goals of CSS is to allow users greater control over presentation.

FactSnippet No. 702,824

Inheritance is a key feature in CSS; it relies on the ancestor-descendant relationship to operate.

FactSnippet No. 702,825

Inheritance in CSS is not the same as inheritance in class-based programming languages, where it is possible to define class B as "like class A, but with modifications".

FactSnippet No. 702,826

CSS was first proposed by Hakon Wium Lie on 10 October 1994.

FactSnippet No. 702,827

In 2005, the CSS Working Groups decided to enforce the requirements for standards more strictly.

FactSnippet No. 702,828

However, even when later "version 5" web browsers began to offer a fairly full implementation of CSS, they were still incorrect in certain areas and were fraught with inconsistencies, bugs and other quirks.

FactSnippet No. 702,829

CSS Working Group sometimes publishes "Snapshots", a collection of whole modules and parts of other drafts that are considered stable enough to be implemented by browser developers.

FactSnippet No. 702,830

Adoption of new functionality in CSS can be hindered by lack of support in major browsers.

FactSnippet No. 702,831

Additionally, the CSS 3 defines feature queries, which provide an @supports directive that will allow developers to target browsers with support for certain functionality directly within their CSS.

FactSnippet No. 702,832

CSS that is not supported by older browsers can sometimes be patched in using JavaScript polyfills, which are pieces of JavaScript code designed to make browsers behave consistently.

FactSnippet No. 702,833

CSS frameworks are pre-prepared libraries that are meant to allow for easier, more standards-compliant styling of web pages using the Cascading Style Sheets language.

FactSnippet No. 702,834