Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Dean Onizuka](https://uploads.teamtreehouse.com/production/profile-photos/1939872/micro_profile_default.jpg)
Dean Onizuka
4,753 Pointspurpose of @import and css style sheet linking of media queries
is there any instance where we would use the @import function for media queries that were shown in this video? or linking them in the html file via stylesheet like tags?
seems like the media queries work just fine without going to those lengths or am i missing something here?
2 Answers
![Jacob Herper](https://uploads.teamtreehouse.com/production/profile-photos/1604622/micro_1jacob_square.jpg)
Jacob Herper
94,150 PointsYou can import CSS files into other CSS files to contain a clear structure. However most of the time you would rather include multiple CSS files through your HTML file, as @import might prevent stylesheets from being downloaded concurrently and slows down your page loading time. So the html link element is a better choice.
![James Gill](https://secure.gravatar.com/avatar/564e564f17e01e0f8b7d43a7068ba225?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
James Gill
Courses Plus Student 34,936 PointsAlso, older browsers don't support @import. So, in a roundabout way, you can use @import to "hide" styles from these older browsers (@import doesn't work for them, so they ignore the imported file).
But as Jacob said, I think it's best to go ahead and <link> the style sheet within the HTML.