Hey, I have a site looks and performs pretty neat imo, but according to google's page test they suggest I but some CSS in the HTML itself.
Now my question the styles.css sheet is around 300 lines of code, can I include that straight into the index.html file?
As follows:
Is there a drawback for inserting CSS directly into the HTML instead of using the link to the external .css file?
Eliminate render-blocking JavaScript and CSS in above-the-fold content
Your page has 3 blocking CSS resources. This causes a delay in rendering your page.
None of the above-the-fold content on your page could be rendered without waiting for the following resources to load. Try to defer or asynchronously load blocking resources, or inline the critical portions of those resources directly in the HTML.
Optimize CSS Delivery of the following:
http://mysite.co.za/css/bootstrap.min.css
http://maxcdn.bootstrapcdn.com/…t-awesome/4.2.0/css/font-awesome.min.css
http://mysite.co.za/css/styles.min.css
Now my question the styles.css sheet is around 300 lines of code, can I include that straight into the index.html file?
As follows:
HTML:
<head>
<style>
.blue{color:blue;}
...
...
...
...
etc
</style>
</head>
Is there a drawback for inserting CSS directly into the HTML instead of using the link to the external .css file?