Junior JavaScript

What is the difference between @import and <link>?

Follow me on LinkedIn:

Aspect @import <link>

Loaded Inside CSS Inside HTML

<head>

Performance Slower (sequential) Faster (parallel)

Media Queries Can include Can include

Recommended

❌ Avoid ✅ Preferred

Key Takeaway:

Use <link> — it loads faster and supports preloading and caching better.

More from JavaScript Tutorial

All questions for this course