3.3 Style Sheets

3.3.1 The Advantage of Using Style Sheets

"Style sheets" are on of the many tools that makes the generation of a whole system of linked HTML documents, called a HTML project or simply project a lot easier. You will not need style sheets if you only want to make a few pages. The classes we just discussed, are part of a style sheet.
Style sheets were introduced just a few years ago, they make the life of HTML-writers a lot easier. Browsers, of course, must "understand" style sheets.
The name "stylesheet" is just a defined expression that tells browser what to do (If the "REL" attributes of the specific links is filled in properly). Loosely speaking, we may call the contents of our special "styles" file the style sheet of a collection of HTML documents that are supposed to look the same - to have the same style.
Take one of the Hyperscripts as example. There is a file for each chapter that contains a number of sub files always containing,
  • The text of the chapters and paragraphs (here called "backbone"
  • The exercises
  • The linked documents explaining "basic" things
  • The linked documents explaining "advanced" things
  • The illustrations - HTML documents and the pictures themselves.
Now you want the style of each chapter to be always identical (but easily changeable), but different from the other chapters - maybe you want to have specific background colors or whatever.
So you add a style file that contains the styles of this chapter to the other files contained in the chapter and make links wherever needed to this chapter style file.
What should be contained in the style file? Essentially two items:
Your class sheets (you may have several with different names; maybe a special one for the backbone and another one for the rest.
Your little graphical tools or icons - in our case the triangles and the spheres and anything else that you might use
So there is nothing to using styles and style sheets - but think carefully about the system you are about to install! How many style folders at which level of you file hierarchy are you going to need?
Well, lets try it. Here comes the second assignment
 
 
2nd Assignment
Formatting your Homepage with style sheets
 
 

index.gif zurueck.gif