How to calculate the aspect ratio ratio for "HTML" ("HTML ratio")?

8

The text of an "HTML ratio" refers to the amount of text on a page against the code on the same page.

How to do this calculation, I know I should have to get the DOM probably, but the part exactly what elements and how the caculo works?

    
asked by anonymous 18.04.2016 / 21:04

1 answer

8

What is HTML Ratio or HTML Text Ratio?

The HTML ratio is nothing more than the percentage of actual text in your html page.  In an HTML page we have the Text and the HTML Code, the apportionment is the percentage of text in the page (code + actual text). A simple rule of three would be:

code  ------- 100%
textoReal --- x

ratio = x;

For example, when loading a page it is 80kb in size. When calculating the texts of this page, we can see that of these 80kb, 60kb is just code (html tags, and everything else written other than plain text) and real text it has only 20kb. So we would have 20% text. This is our Code Rate.

 80 ------- 100%
 20 ------- x

 ratio = (20 * 100) / 80;
 ratio = 25%;   

Okay, I know what this is, but what's the use of it?

Well, some search engines use the html ratio to index your site.
If a better position on Google is not enough, for example, having a good apportionment helps SERP's (The way your page appears, usually the title and two or three lines of description).

And how do I calculate this on my site?

So making your own calculating tool can do a little bit of work, and may not be feasible for you. An alternative would be to use some services, such as Dom Monster than @LuizVieira commented , or a few others, such as SeoChat and SmallSeoTools .

But what is the right amount for my site?

There is no pattern to be followed, because you do not know what the search algorithm looks like and what it uses to index the pages, but the recommended one is around 20-80% of your page.

Ready, I've changed the apportionment of my page to the percentage, now will my site be the first?

No, the apportionment of text is only one of the factors for indexing, and is not used by all mechanisms, and its relevance is not known. The best thing to ensure a good place, is to have good content and apply the other practices of that exist.

  

Remember that just as you apply seo practices, other programmers also apply. Do not just use seo on your site that will ensure good indexing.

    
20.04.2016 / 23:34