Categories: CssCss3

Difference between @import and link

Share

Using both @import and link tag you can include style sheet in a webpage. But there is a difference.

For performance “link” has a much better advantage.

Example of @import and link:

<link href="style.css" type="text/css" />

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

As @import allows you to import one style sheet into another but older browsers didn’t recognize @import so for old browser it is better to use <link>.

Recent Posts

Unveiling the Truth: Is the Spread of Sinus Infections a Myth or Reality?

Sinus infections, impacting approximately 31 million Americans each year, represent a significant health concern stemming…

22 hours ago

Best Exercises To Reduce Weight & Keep You Stronger & Fitter!

No doubt that balanced weight is the key to wellness. So, when it comes to…

24 hours ago

ARTIFICIAL INTELLIGENCE: Advantages And Disadvantages? Everything You Need to Know

Pros And Cons Of AI: Artificial Intelligence directly translates to conceptualizing and building machines that…

1 day ago

Four common mistakes when picking an internet provider

We all live on the internet; we use it for everything. Thus, when it comes…

1 day ago

What Is Commonly Misdiagnosed as Pink Eye: Understanding Eye Conditions and Their Symptoms

Introduction: Pink eye, or conjunctivitis, is a common eye condition characterized by redness and inflammation…

2 days ago

Why Flexible Financing is the Future of Small Business

Small businesses are the backbone of the economy. Still, they often face daunting hurdles when…

2 days ago