Why External Style Sheets?


Before going into the technicalities, we should review the arguments, which show that separating style and content is a good idea. Some document formats do not separate the two (for example, PostScript and PDF) so it's fair to ask what the benefits of making the separation are. Here are the most important reasons:

  • Reusability By putting all the style information in one place, it can be pointed to by many documents and maintaining a consistent Web site becomes easier. For example, you can design an organization-wide style sheet that applies to all documents so that they are all given the same background color.

  • Performance After a style sheet is downloaded, the browser can cache it. This means that the next document that uses the same style sheet can be displayed faster because the style sheet doesn't have to be fetched from the Web.

  • User selection A document can link to several external style sheets from which the user can make a selection. Unfortunately, at the time of writing, browsers don't let users make the choice.



Cascading Style Sheets(c) Designing for the Web
Cascading Style Sheets: Designing for the Web (3rd Edition)
ISBN: 0321193121
EAN: 2147483647
Year: 2003
Pages: 215

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net