Jump to content

@import Rule Or <link rel="stylesheet"/>?


Eyad Syria-lover

Recommended Posts

Hello.

I Was Reading A Stylesheet When I Found A Strange @import Rule,I've Never Faced This Rule.

What Is The Difference Between Including A Stylesheet Using @import Rule,And Doing The Same Using <link rel="stylesheet"/>?,And Do You Suggest Me To Use This Rule?.

Link to comment
Share on other sites

I would advise against using @import anywhere except between <style> tags. Otherwise the page has to do extra requests before displaying the page to the user.

 

@import allows stylesheets to include other stylesheets. It works just the same as the <link> tag.

Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...