CSS

AllPages
RecentChanges
Links to this page
Edit this page
Search
Entry portal
Advice For New Users

From Wikipedia:

Cascading Style Sheets (CSS) is a language for describing the presentation of a document written in a markup language. CSS is designed primarily to enable the separation of document content from document presentation, including aspects such as the layout, colors, and fonts. This separation can enable multiple HTML pages to share formatting by specifying the relevant CSS in a separate .css file, and reduce complexity and repetition in the structural content. For each matching HTML element, it provides a list of formatting instructions.

Separation of formatting and content makes it possible to present the same markup page in different styles for different rendering methods, and can be used to display the document differently depending on the output screen size or device. Another Aesthetic changes to the graphic design of a document (or hundreds of documents) can be applied by editing a few lines in one file, rather than by a laborious and error-prone process of crawling over every document line by line, changing markup.

CSS is an attempt to separate out the specifics of presentation style from the content of a document. The idea is to mark something in the document with a tag indicating the semantics of the item - heading, emphasis, list item, etc. - and then elsewhere specific how a given semantic marker should be rendered.

In particular, this allows the same document to be rendered with different style according to the media on which it's displayed.

CSS allows a consistent theme to be applied across an entire site, and changed simply and easily. However, a disadvantage is that to discover how a particular item is rendered, one may have to crawl through multiple CSS files to discover the rules being applied.

Until comparatively recently, different web browsers implemented CSS to different amounts of completeness, meaning that designers had to test their sites across a wide range of possible platforms. Fortunately this is now less of a problem.


Links to this page / Page history / Last change to this page
Recent changes / Edit this page (with sufficient authority)
All pages / Search / Change password / Logout