<link href> or <style> for css?
Posted: Sat Mar 20, 2010 10:59 pm
I am working in a website that will possibly require different stylesheets.
I've been using <link href> to link to different stylesheets, but lately this idea stroke me, why not turn the css file into a php document and include it inside the page using the <style> tag instead?
I thought that this would be faster as no additional requests would be made to the server for the css files and also it could have the benefit to use php tags to e.g. specify and generate a path for images like <?php echo $image_path ?>test.png
What do you think of this idea?
I've been using <link href> to link to different stylesheets, but lately this idea stroke me, why not turn the css file into a php document and include it inside the page using the <style> tag instead?
I thought that this would be faster as no additional requests would be made to the server for the css files and also it could have the benefit to use php tags to e.g. specify and generate a path for images like <?php echo $image_path ?>test.png
What do you think of this idea?