Date First Published: 7th December 2022
Topic: Web Design & Development
Subtopic: Web Development
Article Type: Computer Terms & Definitions
Difficulty: MediumDifficulty Level: 6/10
Learn more about what code-to-text ratio is in this article.
Code-to-text ratio is the percentage of a webpage that contains text compared to the amount of HTML markup needed to display it. The ideal code-to-text ratio is between 10-60%.
A high code-to-text ratio indicates that a website contains a large amount of text with little HTML code needed to render that text, whilst a low code-to-text ratio text indicates that the page may have excessive code that increases the size of the HTML file or not enough text.
Code-to-text ratio may also be known as code-to-content ratio. However, it is more accurate to say code-to-text ratio.
No, code-to-text is not a Google ranking factor. On 27th March 2018, John Mueller of Google confirmed in a Google’s Webmaster Office Hours Hangout that code-to-text is not a ranking factor. He also explained that certain sites use more HTML, whilst others use less. Code-to-text ratio is not a term that Google officially recognises. We urge you to be wary of any studies that link code-to-text ratio with Google rankings.
Although code-to-text ratio is not a ranking factor, it is something worth measuring as it can be used to determine the user experience and crawlability of a page. Not enough text can confuse search engine bots as they won't have enough information to determine the context and what the page is about. In a similar way, not enough text for users will likely cause them to move off the page as it might not answer their question in enough detail. The code-to-text ratio can also determine whether the page has excessive HTML that slows down the page speed, especially on mobile devices. A slow page speed will have a negative impact on user experience and page speed is confirmed to be a minor Google ranking factor.
Ways of improving code-to-text ratio are:
If you want to check the code-to-text ratio of a page, you can use the free SEO Centre Tools checker. All you need to do is enter the URL into the checker and it will then return the code-to-text ratio percentage. It measures the code-to-text ratio by working out the percentage of the total content size compared to the total size of the HTML file.
If so, it is important that you tell me as soon as possible on this page.
Network Services Network Setups Network Standards Network Hardware Network Identifiers Network Software Internet Protocols Internet Organisations Data Transmission Technologies Web Development Web Design Web Advertising Web Applications Web Organisations Web Technologies Web Services SEO Threats To Systems, Data & Information Security Mechanisms & Technologies Computer Hardware Computer Software Ethics & Sustainability Legislation & User Data Protection