Does Text to Code Ratio Affect Search Engine Optimization?

Share the tech
Facebooktwittergoogle_plusredditlinkedinmail

What is Text to Code Ratio?

The text to code ratio refers to the amount of text (visible content) on a web page versus the amount of HTML and JavaScript code (non-visible) on the same page. Server side code is not a factor in the ratio. For example, if a page is 100 kb total size, and 15 kb of that is visible text, such as your blog post or product information, that page would have a 15% text to code ratio.

What is the right ratio of Text to Code?

You can find claims anywhere from 20 to 70 percent as the proper ratio. However, the answer is more complicated than that. Text to Code is not a direct ranking signal for search engines, however there are many related factors that can affect search engine rankings.

For example:

  • Optimized for People: Web pages with more text and less code are more readable and understandable, making it seem more important and of higher quality to search engines.
  • Optimized for Speed: Less code can result in faster loading web pages. Faster loading web pages often result in a better user experience and is a significant search engine ranking factor.
  • Optimized for Indexing: Less and cleaner code can result in a higher ratio of visible text, making it easier for search engines to crawl and index the page.

What’s right for my site?

The Growth How Website Analyzer includes the Text to Code Ratio on the Desktop Page Stats page because it’s just a guide and there is no perfect ratio. We share the metrics that have a desired result on the SEO Analysis Overview page which generally includes recommendations. Your page needs to load quickly and include quality content that meets the needs of your customer/reader/visitor. The text to code ratio is a guide, but if the content is poor or the page has errors or problems, the ratio is irrelevant.

How do I improve my Text to Code Ratio?

  • Use Growth How Website Analyzer to analyze your website. This tool offers suggestions to improve the code as well as other Search Engine Optimizations.
  • Verify if your website is using valid HTML Code.
  • Remove any unnecessary code.
  • Remove huge white spaces.
  • Avoid lots of tabs.
  • Remove code comments.
  • Avoid tables. Use tables in your layout only when necessary.
  • Use CSS for styling and formatting, but avoid inline CSS.
  • Avoid inline JavaScript.
  • Remove any hidden text that is not visible to people.
  • Remove any unnecessary images.
  • Remove unnecessary JavaScript.
  • Remove all flash.
  • Trim protocol from URL’s: (URL’s still work without the “http://”.
  • Don’t close tags that don’t need closing. (according the HTML version you use).
  • Use anchors and relative URL’s instead of absolute URL’s.
  • Shorten class and id names.
  • Use URL shortening services.

Leave a Reply