Tuesday, November 3, 2009

Content to Code Ratio (Code to Text) - Reduce Code Bloat on Your Page to Improve SEO

The content to code ratio (or code to text ratio, etc.) refers to how much code your page has relative to how much content (or text). An easy way to see this is by viewing the html source (e.g., View > Page Source in Firefox) and looking at how much code there is relative to how much readable text. Given that search engines look at the code for a given page, bloating that page with a lot of code (which is not contextual), simply dilutes the text that is there, thus lowering your page's relevancy to various keywords you may be targeting.

Why do you have a low content to code ratio? Three typical reasons and solutions include:
  • You include Javascript code in the page - move your JS to another file, if you can't do that, move it to the bottom of the page (the lower something is in the page, the less weight it carries with the search engines)
  • You use a lot of in-line styling - use Cascading Style Sheets (CSS), located in an external file, to reduce code
  • Formatting using tables - use CSS to create grid layouts instead as it requires less cod
Here's a good tool I found to test the content to code ratio.

No comments:

Post a Comment