CSS (Cascading Style Sheets)


CSS is a stylesheet language for specifying the intended appearance of a structured document. Its most common use is for applying styles to web pages written in HTML or XHTML, but it can also be used in conjunction with other markup languages such as SVG, MathML and XUL. It is a W3C standard and is supported by most modern web browsers (including Chrome, Firefox, Internet Explorer, Opera and Safari).

A CSS stylesheet consists of a sequence of rules, each composed of a selector and one or more styles. The selector defines which elements of the document the rule applies to, and the styles describe how those elements should appear. It is possible for a document to have most than one stylesheet, and for an element to be influenced by more than one rule.

Use of a CSS stylesheet allows style to be separated from content. This makes it easier to achieve consistency and to make global changes, particularly when many documents share a common stylesheet. It is also possible to supply different stylesheets for different output devices (for example, to remove navigational elements from a web page when it is printed).


See also

Further reading