大网数据广告活动
网站运营与故障问答

SEMRush reports a high html-to-text ratio, what is optimal for SEO?

· 52CE 我爱测

If I am creating or maintaining a website so for the SEO or page experience point of view: 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) Or how …

问题原文

原帖链接 · Gaurav Jain · CC BY-SA 4.0

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)

社区高分解答

原帖链接 · Maximillian Laumeister · CC BY-SA 4.0

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2021-01-25)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。