: The technical details about how the code for a page is delivered have almost no impact on SEO. Google ranks pages on factors that users will see, not on how pretty the development is.
The technical details about how the code for a page is delivered have almost no impact on SEO. Google ranks pages on factors that users will see, not on how pretty the development is. Inline CSS and scripts are not ranking factors for Google.
The only time that code matters for SEO would be if it impacts performance. For SEO, your page source code must download completely with 7 seconds. If it is slower than that for Googlebot, Google makes rankings worse for it. It also most completely download and render for users within 3 seconds. If it is slower than that, users stop using it as much. Google notices this user behavior and makes rankings worse.
Having inline CSS means that it can't be cached between page loads. That means that the first page view may be able to render faster, but subsequent page views are going to be slower.
There are good development practice reasons to keep you styles out of style attributes:
Code in style attributes effects only one tag. If that same style is to be applied to multiple tags, the CSS code must be duplicated. That would violate the good development practice of "don't repeat yourself" (DRY).
Keeping all CSS in .css files means that it is easy to find. Somebody looking at your code base for the first time is going to start looking for styles there and wouldn't want to have to open PHP and HTML files to find CSS.
Keeping all CSS in .css files helps separate code that different developers are likely to work on. This "separation of concerns" means that the front end designer and the back end coder are less likely to step on each other's toes, and less likely make code changes that conflict with each other.
More posts by @Megan663
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.