Best way to include a stylesheet

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

Best way to include a stylesheet

Post by icesolid »

What is the best way to include a style sheet into the head of a HTML document?

This:

Code: Select all

<style type="text/css" media="all">@import url("../styles/global.css");</style>
OR:

Code: Select all

<link rel="stylesheet" href="../styles/global.css" type="text/css" media="all" />
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: Best way to include a stylesheet

Post by kaszu »

I think <link /> because using <style> tag and css declaration just to include other css is unnecessary if that can be done with just a tag.
Post Reply