Monday 16 November 2009

Session 6: CSS

INM348 - Digital Information Technologies and Architectures
 
Cascading Style Sheets (CSS) are a means of communicating the visual and aesthetic elements of web pages in an effective way. The first CSS specifications were introduced by the World Wide Web Consortium (W3C) in December 1996. Previously, all presentational elements for web pages had to be included in the HTML, often repeatedly, making web code unwieldy and complex.

The combination of CSS and HTML is generally thought to be an elegant solution. You can specify all your layout rules for a group of web pages in a single place - a cascading style sheet - and simply link to them.

You can import different style sheets to the same page; the Zen Garden web site shows how you can use style sheets to give a different appearance to a website without disturbing the content [URL: http://www.csszengarden.com/]. You can import several different style sheets if necessary, for example to aid accessibility for visually-impaired users.

You can use the rules in your CSS to apply layout to the parts of the page you want, such as specifying a font or colour for a heading or paragraph text. You can use the 'class' command to add different styles to the same tag. And you can use 'positioning' to arrange your elements on the web page interesting way, without having to use tables.

As a demonstration, I have set up a simple style sheet for my public web page [URL: http://www.student.city.ac.uk/~abhd820/index.html]. You can see the CSS here: http://www.student.city.ac.uk/~abhd820/paulspage.css.

While most agree that the separation of content from presentation that CSS embodies is a good thing, there are some limitations. For example, different types of browsers tend to interpret CSS inconsistently; and some commentators feel that CSS specifications still lack flexibility - the wikipedia page for CSS summarises these concerns under 'Limitations of CSS'. [URL: http://en.wikipedia.org/wiki/Cascading_Style_Sheets]

Word count: 300 words.

No comments:

Post a Comment