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

2.4. The <link> Element

There is a third way CSS information can be added to a Web page: by specifying CSS elements in a completely different Web page, which are then linked to the original page. By specifying the display and layout attributes in a separate Web page, you can customize the style for a set of Web pages that use ordinary HTML code. This is potentially most appealing for Web authors who manage large Web sites, since all you have to do is make changes to a single page which are then reflected globally throughout your Web site.

To use the <link> element, you must first create a simple text file that contains nothing but CSS formatting information in much the same format as used by the <style> element, as you can see from the code displayed in Listing 2.3 and Listing 2.4 (each representing separate pages named formatting.css).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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