Cascading+Style+Sheet

= Cascading Style Sheet = toc Separating style from function was a goal early on. Tim Berners-Lee created his own style sheet function in 1990. Others discussed the possibility of separation, though no one seemed eager to implement the change. In order to have support for a style sheet, a browser must be able to read and access it. Some forms of coding are only available to certain browsers. Other forms cross browsers but are not read by all. In 1995, the W3 Consortium set up the HTML Editorial Review Board. One of their priorities was to discuss, then recommend, style sheet specifications. Without a standard, browsers could set up their own coding, making it difficult for users to navigate from one site to another. CSS1 came out in 1996; CSS2 became a recommendation in 1998. CSS3 was originally expected in 1999, then in 2004. W3C lists CSS publication history as: 2000, the first public draft; 2001 offered three different working drafts.

Cascading style sheets allow a facility's web manager to create and maintain a facility web presence with less effort than it would take to create several pages in HTML. CSS also allows a new or temporary web manager to continue with the same format.

About CSS
The Cascading Style Sheet (CSS) allows website developers to create a uniform website simply by linking the individual web pages to the css document. Unique individual elements within each page may still need to be encoded separately but, the overall structure of the page will be determined by the style sheet. CSS uses selectors made up of HTML elements, such as headers, paragraphs, body, and so on. Each of these elements may have a style assigned to it on the style sheet. Properties are used within these elements to assign certain characteristics to an element. Font, color, background color and placement might be properties associated with an element while margin, padding, float, border and border style may be associated with images.

[[image:css_insheet.jpg align="right" caption="CSS code in HTML head "]]
CSS uses a different way than HTML to express its commands. Where HTML will use the greater-than and lesser-than symbols, or right and left arrows to enclose its code, CSS uses curly brackets. The curly brackets will also be separated from the code by a space, where the arrows in HTML always abut onto the coding. CSS uses colons to separate the element from its properties - font color: #003399; HTML uses the equal sign and double quotes (= " ") - font-color="#003399". HTML tags must be closed; CSS codinghas no closure outside of the HTML elements encoded directly onto the webpage. CSS allows for form and design; HTML is the mechanics of the page. HTML can also use CAPITAL LETTERS in its commands while CSS always uses lower-case.

CSS can be added directly to a page by using the HTML "Style" element in the document head. This is good for a single page which will be coded differently than the rest of the website, or for websites with few pages. In general, it is considered better to use a separate style sheet which can be linked to all pages, using the HTML "Link" element in the document head.

Examples
CSS can be used to set a common background image across pages and to present a uniform header. It can also be used to set images to the sides of pages with the text flowing around them. It is used to create margins within a page, for instance, to center a narrow band of text instead of having the text spread out across the entire page. CSS can make a positioning absolute or cause the various elements in the page to position themselves in relation to each other. An example of CSS coding to set a background color and image to a page header:

HTML code is used on the web page in order to implement the various CSS elements. The HTML code to implement the header above would be:

The div id is indicated on the style sheet by the pound, or number, sign: # A div class is indicated by a period or full-stop before the name: .name.

CSS, like javascript, allows designers to leave notes for themselves or for others who follow after them, for instance where more than one person might reasonably be expected to work on a web site, such as a corporate or facility site. Special markings before and after the note alert the human reader to the existence of a note while convincing the computer to ignore it. To make notes in a style sheet, begin the note with a slash and then an asterisk: /* Leave a space, write the note, leave another space, then close with an asterisk and a slash: */ Notes might include marking certain elements that are only temporary, such as seasonal elements, or elements that are being tried out. Other notes might include the developer of a particular CSS code if that code was borrowed from someone else or not developed by the designer of the rest of the page.

**References**
[|CSS Intensivstation: CSS3 The Future]

[|Cascading Style Sheets, designing for the Web by Hakon Wium Lie and Bert Bos - Chapter 20: The CSS Saga]

[|W3C CSS3 Introduction Publication History]

[|W3C Cascading Style Sheets Snapshot 2010]

[|HTML Help: CSS Quick Tutorial]

Example: [|Web Developer's Virtual Library House Style Sheet]