• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Style Sheets > Linking to Style Information in a Separate File

Linking to Style Information in a Separate File

One important thing to realize is that you don't have to store your style sheet information inside each of your XHTML documents. If you anticipate applying the same styles across several XHTML pages, it is much more efficient for you to store the style information in one place and have each XHTML document linked to it. This makes it much easier to change the formatting of all your pages by changing the style sheet instead of changing every page.

Setting Up the Style Information

To set up a linked style sheet, you first need to create the file with the style information. This takes the form of a plain-text file with style information entries. Each entry starts with an XHTML element, followed by a list of presentation attributes to associate with the rendering of the effect of that element. Some sample lines in a style sheet file might look like this:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint