- What is HTML to text ratio?
- What is the optimal code to text ratio for web pages?
- Does the text to code ratio of a web page impact ranking signals?
- How to improve your text to HTML ratio
Most web pages are written in HTML (hypertext markup language) code and translated by your web browser into display content.
No doubt you’ve heard rumours circulating the Internet about the importance of having a healthy code to text ratio. But do search engines such as Google, really take the HTML to text ratio into account? Is it a ranking signal in search algorithms?
We’ve outlined below whether the HTML to text ratio is an important ranking signal.
What is a Code to Text Ratio?
The code to text ratio refers to the percentage of text on a specific webpage in relation to the amount of HTML code required embedded.
Essentially, it’s a ratio that informs search engines of the amount of text your webpage should contain, but those of our readers that are part of a marketing team or own an eCommerce business should not be phased.
While a higher text to HTML ratio is indicative of a better user experience (UX), the ideal HTML to text ratio is not as big as you think.
What is the Ideal Code to Text Ratio?
When it comes to displaying content on a webpage, the ideal HTML to text ratio is anywhere between 25-70%. The percentage refers to the amount of visible text on the page as opposed to other non-visible elements, including:
- ALT tags
- Downloadable files such as PDFs
If you conduct a website comparison, you might notice that high-ranking websites have significant amounts of visible text, especially in Google search results.
The Panda algorithm update continues to reward content-driven sites and diminish the presence of websites with thin or poor content in search engine result pages (SERPs). Many SEO professionals will know that Google considers content to be one of the most important ranking factors.
Anyone who has built a website will also know the challenges of constructing pages with significant amounts of content. Likewise, the pain points that HTML to text ratio can have on UX and page speed are factors most digital marketers have confronted.
But is the code to text ratio even a ranking factor for search engines?
Do Search Engines Consider HTML to Text a Ranking Factor?
According to Webmaster Trend Analyst John Mueller, Google does not have a text to code ranking algorithm. However, he noted that search engines use it to determine whether web pages have “bloated” HTML, especially if the page loading speed is slow, as this will negatively impact UX.
So, while the code to text ratio does not directly impact rankings for search engines, there are many factors related to the ratio that suggests it could indirectly affect ranking signals.
Many SEO professionals have stressed the importance of having a good HTML to text ratio, arguing that it helps search engine crawl bots determine the relevancy of webpages. Besides loading issues caused by bloated HTML, search engines could struggle to understand what your webpage is about if it lacks visible text.
If search engines crawl your web page but struggle to determine the context of that page, chances are competitors who have a higher code to text ratio will appear higher in SERPs.
Is HTML to Text Ratio Important For SEO?
Now you know that search engines don’t use the code to text ratio as a ranking factor, is it still relevant for SEO?
Using tools such as Google Search Console (GSC), you can identify whether your web page’s code to text ratio impacts UX, especially on mobile. How?
The Core Web Vitals report in GSC can tell you whether you have a bloated “HTML” through three primary factors:
- Page loading speed
- How your page loads
- Layout shifts
Identifying weak areas in your site can help you improve SEO and boost user experience. Remember, usability is related to customer satisfaction – a good user experience goes hand in hand with profit.
When structuring and populating your web pages with content, aim for an HTML to text ratio of 25-70% to avoid creating a poor UX.
How to Improve Your Text to HTML Ratio
Like SEO, the key to optimising your HTML to text ratio is to improve the user experience. Building your web pages with the user in mind will encourage people who land on your site to stay, which will help your performance in SERPs.
We advise starting with making sure your HTML code is valid, which you can check with tools such as W3C’s Markup Validation Service.
Once you’ve determined that your HTML is valid, evaluate your page speed. Again, less code will indicate that you don’t have unnecessary HTML elements embedded on your web page, increasing loading speed and improving UX – a direct ranking factor.
If you have a lot of HTML code, remove the unnecessary elements, such as:
- White spaces
- Inline styling
If possible, avoid using tables as they produce a lot of HTML code.
Finally, eradicate any hidden text, compress and optimise your images and try to keep the size of your pages under 300kb. Following these steps will improve your HTML to text ratio and page loading speed, making it easier for search engines to crawl and index your site. You can use Siteliner to quickly check your website’s average ratio as a very handy tool when looking to minimise your HTML to correct speed issues on your site.
While the HTML to text ratio does not directly impact ranking signals, the evidence outlined above shows that optimising your HTML code could improve your page loading speed and boost UX, which is a significant search engine ranking factor.