5

If I am creating or maintaining a website so for the SEO or page experience point of view:

  1. What memory size of text will be comparable to HTML code (for example: text should be 52kb and HTML should be 100kb or vice versa)
  2. Or how much characters will be measurable low, medium, and good compare to HTML code (for example: text should be 250 words and HTML code should be 500 words or vice versa)
4
  • 4
    Why would you think that there's an optimal ratio for SEO? The ratio is going to very widely depending on what the page does. If it's a long story it's going to have more text and less HTML. If it's a web-based tool it's going to be mostly HTML and very little text. I don't see how this ratio could possibly matter for SEO beyond trying to minimize your HTML for performance reasons. Jan 25, 2021 at 16:28
  • If there is no concept of ration of text to HTML then why SEO tool like SEMRush shows the warning of low text-HTML ratio? Jan 26, 2021 at 18:02
  • 1
    Many SEO tools report a variety of metrics that are unlikely to have any actual impact on SEO. SemRush explains why they have this metric at point #6. I'm also suspicious of some of their other metrics. Of the things they test for, I'd only pay attention to broken links and missing title tag. Many of their other tests are either outdated or not something that I would think would make much difference. Jan 26, 2021 at 18:58
  • 1
    I edited your question title and tags to indicate this is based on advice from SEMRush Jan 26, 2021 at 19:01

2 Answers 2

4

I'll say it boldly:

Text-to-HTML ratio is a bad metric that has no place in SEO.

If you're using Text-to-HTML ratio as a "warning flag" to pick out pages to take a closer look at, that's one thing. But it's not correct to say that the metric reliably points out "bad pages" - there are plenty of valid reasons a page could have low Text-to-HTML ratio.

Two much better metrics are total page weight and page load time (including time-to-first-paint, time-to-interactive, and other sub-metrics). I'll go through the points from the semrush article and rebut them one by one.

For example, a low text-to-HTML ratio can be a sign of:

  • A poorly coded website (with invalid code and excessive Javascript, Flash and inline styling)

A low text-to-HTML ratio can be a sign of a poorly coded website, but it can also be a sign of:

  • A web page that is not text-centric (like a web tool, for instance)
  • A web page that uses code to create interactive features (for example, an interactive map on a pandemic news article)
  • A web page that is useful despite only having a minimal amount of text content, for example an author bio page, image gallery page, or contact form page.

All of those are correct use cases that could cause a low text-to-HTML ratio.

a low text-to-HTML ratio can be a sign of:

  • Hidden text, which is something spammers do, so it's a red flag for search engines

I have never heard of text hidden through conventional means (display:none, visibility:hidden, etc.) causing SEO issues. Search engines just skip it for the most part. If you're deliberately using black-hat techniques to cloak your text, such as positioning it off the page or coloring it white-on-white, then you don't need Text-to-HTML ratio to tell you that you're doing something wrong, you already know you are.

a low text-to-HTML ratio can be a sign of:

  • A slow site – the more code and script pages contain, the slower they’ll load, and page load is an important SEO factor.

The relevant metrics here are JavaScript execution time and consequently page load time, which are only tangentially related to Text-to-HTML ratio. If you want to measure page load, just measure page load.

In conclusion, look at page weight and page load time. Text-to-HTML ratio for the most part does a bad job at approximating these much more useful metrics. In my opinion the only use of this metric might be to "flag" pages on your site as outliers, so that you can manually review them using better metrics and ask yourself if there's a good reason for them being an outlier.

Edit: As Stephen mentioned in the comments, Google's Core Web Vitals are a useful set of metrics that Google will start ranking on this year.

1
  • 1
    Specifically if you want to measure performance more directly, you should probably be using Google's metrics for core web vitals. While not perfect, they are head and shoulders above metrics like html-to-text ratio. Plus Google evaluates all pages it crawls with those metrics and says that it will be using them as a direct ranking factor starting in May 2021. Jan 27, 2021 at 10:34
0

You have asked about ratio and seo. Your answer lies in test pages with different ratios in the search engine concerned. Pick a keyword with low competition and launch 5 pages with different ratios and see which page positions first, and then compare after 1 month 2. This was the way we did it 20 years ago.

This is how you get your answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.