Comparison of stylesheet languages

From Wikipedia, the free encyclopedia

In computing, the two primary stylesheet languages are Cascading Style Sheets (CSS) and the Extensible Stylesheet Language (XSL). While they are both called stylesheet languages, they have very different purposes and ways of going about their tasks.

CSS is designed around styling a document, structured in a markup language, HTML and XML (including XHTML and SVG) documents. It was created for that purpose. The code CSS is non-XML syntax to define the style information for the various elements of the document that it styles.

The language to structure a document (markup language) is a prelimit to CSS. A markup language, like HTML and less XUL, may define some primitive elements to style a document, for example <emphasis> to bold. CSS post styles a document to "screen media" or "paged media".

Screen media, displayed as a single page (possibly with hyperlinks), that has a fixed horizontal width but a virtually unlimited vertical height. Scrolling is often the method of choice for viewing parts of screen media. This is in contrast to "paged media", which has multiple pages, each with specific fixed horizontal and vertical dimensions. To style paged media involves a variety of complexities that screen media does not. Since CSS was designed originally for screen media, its paged facilities lacked.

CSS version 3.0 provides new features that allow CSS to more adequately style documents for paged display.

Extensible Stylesheet Language

See also

Related Articles

Wikiwand AI