Wiki-Notes‎ > ‎(1) Website‎ > ‎

CSS (Holly Adams)

Cascading Style Sheets (CSS) is a styling language which addresses the presentation (the overall look and formatting) of a document composed in any language. Most commonly, CSS is used to present websites written in HTML or XHTML. CSS is therefore the code for creating websites. This CSS enables individuals to view certain colors, backgrounds, texts, and the order of that text. Separating the styling of a website (CSS) from its content (HTMLXHTML) both speeds the process of website authoring, by streamlining formatting processing, and it greatly increases the website's accessibility. The world is connected through the internet and with advances in technology, there are increasingly more ways to access the internet's content. In the past, we were only limited to access the internet on personal computers, but now, we can now access the internet from cell phones, tablets, navigation systems and even gaming consoles. As the device changes, the user interface changes. Websites have to be able to accommodate these changes. While the "content" of a website is not changed from device to device, the "style" of that content is changed to fit the particular device.

Essentially, CSS works by assigning rules with respect to look and formatting for the various levels of information categorized in the document written in a markup language. Some of these levels include: Titles (h1) headings (h2), and subheadings (h3). A rule assigned at the h1 level of the document will "cascade" down to the h2 and h3 levels (with some modification) unless a new rule is applied directly to those levels. For example, if the rule for font assigned to h1 is Times Roman, then that same rule will cascade down to h2 and h3 assigning those levels the same font.

With the introduction of the "real-browser-smartphones" and tablet devices, the presentation of a website has had to change. With CSS, there is no need to the website to be rebuilt for mobile devices, the devices themselves rebuilt the website. By overriding the CSS rules for an HTML document, the content can be displayed in a way that best suits the device.  

CSS makes website building easy. There are a number of web-based authoring tools such as Google Sites, used here, and Wordpress that allow you to quickly chose a "look" for your website without having to do any coding. Text can be copied in from any text editor and formatted automatically.

An example of CSS coding:

    selector [, selector2, ...] [:pseudo-class] {
 property: value;
 [property2: value2;
 ...]
}

Another example of CSS coding:


And the final product of the CSS coding from above:




Comments