Answer the question
In order to leave comments, you need to log in
CSS and SEO - which is better styles in a separate file or in the body of the page?
Friends, I have a question, how does it look, I described it in the title of the post. In general, I can not understand SEO spec. says that you need to take out the styles in a separate file, but if I do this, a certain number of additional requests appear. If you leave the styles in the body of the page (and given that the site is on WordPress, and there are a normal number of styles), it turns out to be awesome what an awesome beginning of the page (when viewed through Ctrl + U) and a corresponding increase in the number of errors through the page test on W3.
Personally, I am for CSS in the body of the page (well, you have to edit the errors, there is no other way), what do you think would be more correct?
Answer the question
In order to leave comments, you need to log in
All styles need to be compressed and put into one file. Then they will be cached by the browser and loaded from disk.
According to the rules of Google...
A basic set of styles is selected, only the most basic ones, for example, the grid, the main colors of the site and maybe the size of the fonts, and this is inserted inline directly into the header.
All css files are connected asynchronously on the Internet there are many examples of js scripts that do this.
Throw in the number of requests and take out css, as it should be in files, having previously combined into one common *main.css (this is not a problem for wp). If the site loads in 2 s. and less, then there is no reason to worry.
Without the urgent need to inline (in the html code), it is not hygienic to embed css code. And the SEO-shnik is right, search engines regard this as a detrimental factor.
By "urgent need" I mean the priority in css when working with JS, or the inability for a separate url to drag in a specific style for a class or id.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question