What are two ways to link to an external stylesheet?
Author: Deron Eriksson
Description: This CSS example describes how link and import can be used to link to an external stylesheet.
Tutorial created using:
Windows XP
There are two ways of applying an external stylesheet to a document. The first method is using an HTMLW link element, as shown here: <head> ... <link rel="stylesheet" type="text/css" href="style1.css" /> ... </head> The second method is to use the CSSW @IMPORT rule. This rule consists of the @IMPORT keyword followed by the URL of the stylesheet to import. All @IMPORT rules must precede all other rules. The @IMPORT rule is demonstrated below: <style type="text/css"> @IMPORT url("style2.css"); </style> (Continued on page 2) Related Tutorials: |