Q&A: What is the difference between accessing an external css file in php vs html?

Question by Some G: What is the difference between accessing an external css file in php vs html?
I mean like what are the differences is one a superior less cluttered way to do it or more efficient or something?

being the html way


being the php way

Best answer:

Answer by Scott C
With the PHP approach above, you’re actually inserting the contents of the CSS Stylesheet into your HTML document. With the HTML link approach, you’re simply making the CSS elements accessible to your HTML document.

It’s a matter of individualized view and style, but I like to simply link to the CSS using the HTML link tagset. It’s less cumbersome upon the browser, as it does not add to the page weight, and the page could download and render quicker.

Know better? Leave your own answer in the comments!

WordPress SEO fine-tune by Meta SEO Pack from Poradnik Webmastera