Cascading Style Sheets

explanation - by the guys who invented them

Manual by:
Hakon Lie

Reviewed by:
Rating:
3
On 4 July 2009
Last modified:11 January 2016

Summary:

Separating style from content

What are cascading style sheets (CSS)? Answer – "a simple mechanism for adding style (fonts, colors, spacing) to Web documents". If you have spent any time at all wrestling with HTML code, trying to control the layout and appearance of text on a page, you will know one thing. It’s an almost hopeless task. What looks good in Netscape might be a dog’s breakfast in Internet Explorer, and it will probably look even worse in Opera. The same would be true of more recent browsers such as FireFox and Google Chrome.

Cascading Style SheetsAs Lie and Bos explain: "HTML doesn’t pay much attention to the document’s appearance" – so CSS offers "a simple language that can be read by humans". It’s basically another system of coding which can be added to .htm pages which allows the author more control over the physical appearance of what’s on the page. It also begins the process of separating appearance from content. They start with an introduction to basic HTML (which they claim can be learned in less than a day!) before describing CSS in all its detail. This is where any normal user will encounter the first difficulty – because the code is defined in a relentlessly arbitrary jargon – of ‘selectors’, ‘declarations’, ‘properties’, and ‘values’.

Then they go on to describe the variety of ways in with a style sheet can be ‘glued’ to a document. This fortunately offers the user more than one way to achieve a particular effect. But there’s no escape from the abstract style:

Recall from Chapter 1 that an attribute is a characteristic quality, other than the type or content of an element. In that chapter we discussed the attributes HREF, SRC, and ALT. In this chapter we will discuss two new attributes that have been added to all HTML elements to support style sheets

But what it lacks in accessibility, it makes up for in thoroughness, and fortunately, the book is very well illustrated. They cover all the features of this mini-technology which Web designers are likely to require – fonts, spacing, layers, colours, and the tricky issue of forward compatibility. They describe the issues of cascading and inheritance which advanced users might wish to exploit. I would have liked to see the page code for some of the wonderful examples they reproduce in full colour, but at least they show what CSS can do.

Style sheets may well become more popular as the early generations of browsers which didn’t support them fade into the ancient history of the Web [that is, anything more than five years old]. If you’re interested in exploring the possibilities of CSS, then you might as well get the story from the guys who invented the idea – and make sure you buy the latest (third) edition, which contains a useful comparison of browser-support. As the HTML standard is developed to keep pace with browsers in their latest versions, this is a book with a bright future.

© Roy Johnson 2005


Hakon Lie and Bert Bos, Cascading Style Sheets: Designing for the Web, New York/London: Addison-Wesley, (third edition) 2005, pp.416, ISBN 0321193121


Web design links

Red button Web design manuals

Red button Web Design: Tools and Techniques

Red button Designing Web Navigation


Buy from Amazon US     Buy from Amazon UK

You can leave a response, or trackback from your own site.

If you found this article interesting you might want to Tell-A-Friend.

Tell A Friend
  1. (required)
  2. (valid email required)
  3. (required)
  4. (valid email required)
 

cforms contact form by delicious:days

Leave a Reply

 
 
 
 
 
 
css.php

Powered by eShop v.6