CSS, Cascading style sheets, denotes a language for managing the appearance of a Web page. The CSS language is a recommendation from the World Wide Web Consortium (W3C), as are HTML and XML.
With the style sheets, the rules to be applied to one or more HTML documents can be defined. These rules cover the positioning of the features, their alignment, fonts, colours, margins and spaces, borders, background images etc.
The purpose of CSS is to separate the structure of an HTML document from its appearance. With HTML, both the structure (the contents and hierarchy between the various parts of a document) and the appearance can be defined. But this poses a few problems. With the combination HTML/CSS, you can create web pages where the document structure is in the HTML file, while the appearance is in the CSS file.
With CSS for example you can define a set of style rules common to all the pages of an internet site. This makes it easy to modify the appearance of an entire site. With CSS you can also define different rules for each display medium (a standard browser, a television, a mobile support, a Braille reader etc.). CSS also enables improved accessibility to Web documents.
In addition, CSS adds new style functionalities compared to HTML. HTML allows only limited styling of documents .
Here is an example of a CSS rule:
p font-color: red; font-size: 12pt
Explanation: this rule defines the colour and size of the text for the elements
(paragraphs) of an HTML document. Thus, all the paragraphs will be in a red font and a have a size of 12 points.