Google Says Code To Text Ratio Has Never Been An SEO Factor… but is that really true?

Moments of clarity from Google are rare, so it’s nice to when they come out and say something simple and unambiguous like

The code to text ratio is not, and never has been, a factor in SEO.

John Mueller / Google

Except… is this really true?

Assuming it’s safe to take Google at face value here and that there is not a ranking factor specifically measuring how much “code” (the stuff that makes up the page and its design but isn’t the stuff you read) there is compared to “text” (the stuff you actually read) then is it safe to just stuff as much code as you want into a page?

Err… no. Definitely not.

The reason for this is our old friend from Core Web Vitals, Site Speed.

The more code on the page, the more bytes of data you need to transfer to load it. The more Javascript libraries, CSS files, etc. that you load, the more bytes of data you need to transfer to load those as well. You can have a lot of code and not a lot of content on your web page and all of it will add to the amount of data you transfer and potentially slow your page down.

So, whilst the specific ratio of code to text isn’t a ranking factor that’s no reason to let your pages get bloated with unnecessary code. This is especially important when working with a CMS like WordPress. In their efforts to make themes flexible and configurable, WordPress developers often have to write more complex code than would be required if they knew exactly the layout that they were producing ahead of time. More options means more code. If you know the layout you want, consider working with a developer to create a bespoke theme that with just the options, and code, that you need.

You can find the quote from Google and more at

Leave a Reply