Skip to Main Content


By: Matthew Hadwen - Customer Street CSS Pro
Comments ( 0)
Dec
20

Linking to an external stylesheet

There are two ways to link to external stylesheets by including the following in the header of your page:

<style type=”text/css”>
@import url(/filepath/style.css);
</style>

Or,

<link href=”/filepath/style.css” rel=”stylesheet” type=”text/css” />

There are few advantages or disadvantages between the two methods

@import can be used within stylesheets to append other styles to the document but must be used before any style rules are set

@import “mystyle.css”;

And

@import url(“mystyle.css”);

Are interchangeable

1 Star2 Stars3 Stars4 Stars5 Stars
4.33
after 3 Votes