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

Page:    1 2 >

There are two ways of applying an external stylesheet to a document. The first method is using an HTMLW link element, as shown here:

<link rel="stylesheet" type="text/css" href="style1.css" />

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");

(Continued on page 2)

Page:    1 2 >