Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I've run sites that I've developed through various online SEO checkers over the years and some of them have checked me for my text to html ratio. I remember reading about this once or twice as well. I have to ask if there is any definitive proof of SEO penalties by, say, Google, when you have done your due diligence with alt/title attributes, schema.org, Facebook's Open Graph, etc, or when you are forced into one of those "div within a div within a div" designs where you end up with a LOT of code?

UPDATE I guess I wasn't clear enough in my question. I understand fully that your page should be useful and meaningful to your end user and not Google. When you have marked up your code so that your page has semantic meaning to Google(as you should!), your code ratio just keeps getting bigger and bigger. My question was if there is definitive proof that Google penalizes your page if the code outweighs the content by a certain percentage. Is this true or some sort of SEO urban legend?

share|improve this question

4 Answers 4

Assuming the HTML page is of a reasonable size (back in 2006 it was 500kb, now it's likely much more), Google doesn't care about your pages' text-to-code ratio. Focus on creating great content instead, don't worry about your markup from an SEO point of view.

From a user's point of view, having a fast-loading page is great (so take care of unnecessary fluff, when you spot it), and having a page that looks good on a variety of browsers/devices (sometimes it helps to use reasonable HTML) is also a good idea. These things don't directly influence Google's view of your page, but if you're alienating users, then they probably won't recommend your site to others.

share|improve this answer

Looking at the text-to-code-ratio only is not useful. The absolute amount of usable text has to be taken into account to. As long as there is at least some text left after stripping all the markup out you will not get penalized.

On the other hand: If there is almost no meaningful markup it is hard to tell what a page is about. It could be an almost empty page with just a long footer.

Years ago, when I wrote my first crawler for a network I had massive problems detecting the main topic on some pages: no headlines or too many, some pages had no semantic markup at all or it was spend mostly on repeating blocks. We had to change the templates to get better search results. I guess search engines like Google will run into similar problems, but they cannot change your websites. :)

Another factor is load time: The bigger the page size is the longer it will take to load. So a load-time-to-text-ratio could be used as a related metric.

The more real unique content you deliver to your users and search engines the higher the probability the crawler will come back, because crawlers work with limited resources too, and they prefer pages that are worth their time.

share|improve this answer

Every website SEO "evaluation" includes a measure of text to code and some times URLs. If your website is a photography site, with primarily images, I expect that crawlers would realize that. There are other considerations with images, especially with page load speed e.g. using the best image file compression format or such. But that isn't your specific question.

For most websites, you should have a few images, not too much Flash content if possible, and definitely a good portion of content, that is, words. I don't recall what acceptable ratios tend to be, but I know that under 20% text content is not good. This is for two reasons:

  1. Page load time is slower with too much "stuff". Slow page load time is definitely reported to me in Google Webmaster Tools for my websites, so I would presume that it has some relevancy to Google etc., regardless of what anyone says that Matt Cutts says.
  2. More important: Google and Bing (and probably Yahoo) both emphasize the importance of original content, which means prose text that isn't stuffed with keywords. You've probably heard this before! If you or other people actually write your site content, rather than the alternatives, you should be okay.

I personally try to keep an eye on my ratio of content to code or mark-up. It is only one factor, but it effects others e.g. page load, and also, the people who visit your website! It is a waste of robots.txt spiders to scan a content-light site, and a waste of time for me as a user to visit one.

share|improve this answer
Can you show me proof as to your statement that under 20% text content is not good, specifically in regards to Google and other search engines? –  huzzah Jan 2 '13 at 15:02
@huzzah I will try to find something for you about that. I knew someone would ask, if I tossed out a specific numeric value! It is a good and valid inquiry on your part. –  Ellie Kesselman Jan 6 '13 at 20:43

No one appears to have explicitly stated that page load time is a minor algorithmic factor, which is probably the most important SEO consideration in the context of this question.

Just keep your code clean and minimal, and don't over do it with semnatic markup. It isn't used as a ranking factor, and its uptake on the SERPs is currently limited (star ratings, recipes etc).

share|improve this answer
Google does penalize pages which are reeaally too slow... but it does not promote those which are super fast. However, users do like fast pages and tend to return to these... –  JVerstry Sep 11 '13 at 20:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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