Cascading+Style+Sheets+(CSS)

Cascading Style Sheets (CSS)
A style sheet language, commonly used in web development to define the colours, fonts and layout of web pages written in HTML and XHTML [|[1]]. It allows for the separation of a sites content from its aesthetic presentation, thus providing a more versatile structure possessing reduced repetition and complexity [|[1]]. CSS also allows for the content to be presented in different styles for dependent on the preferences of the user [|[2]]. Users could be served documents in a form in which they could choose between accepting the author's suggested presentation or specify their own [|[3]]. A style sheet is refers to a set of rules that associate stylistic properties and values with structural elements in a document, thereby expressing how to present the document.

That is to say, specific display attributes are specified separate to their effected text. In doing this, several areas can have these attributes without having to re-specify each of them. These attributes range from: type, size, colour, positioning, images, spacing, lists, and styles. For example,
 * Type – face, weight, style, size, etc
 * Size and spacing – Width and heights, padding and margins, etc
 * Images – backgrounds, image tags, etc
 * Positioning – Absolute, relative, x & y, etc.
 * Styles – Borders, underlines, etc.

Style sheets generally do not contain content, are linkable from documents, and they are reusable [[|3]]. Cascading is the combination of multiple style sheets and the resolution of any conflicts between them [|[3]]. For example, if any element specified in a style sheet that is then contradicted later, the latter element prevails.

There are many documented benefits of CSS web design, including increased accessibility through more web browsers, greater flexibility, added standardization, and faster page loading times.



In the above example, we see how CSS is used to alter the link attributes. In this code, the link code is “changed” so that when it is called, it will be displayed in the way specified in the attached CSS. It is attached by the class name “link”. In this example it is seen in the linked code:

So, when the class for the link is set to “link”, the webpage will search in the attached CSS document for the connected attributes and will apply each. The benefit of working this way is seen when you want to make several links all have the same attributes. Now, instead of applying each link each attribute, we can apply the style in the CSS just the once.

**up** **over**

//References:// [1] "Cascading style sheets." Wikipedia. [2] "Cascading HTML style sheets--A proposal." [3] "PhD Thesis on Cascading style sheets." Håkon Lie. &lt;[|http://people.opera.com/howcome/2006/phd/]&gt;

//Additional Resources//: A detailed history of Cascading Style sheets. Cascading style sheet specifications. Early advantages of cascading style sheets. Historical style sheet proposals.