Increase The Text To Html Ratio

I want to increase the text to html ratio (by reducing the html). I noticed a lot of the page source load is from css. Does that count? How can I reduce it?

Are there other things I can do to improve the html to text ratio? My webpage seems very long when looking at the source.

Hello Allcal,

Thanks for asking. :slight_smile:

Depending on the content and the plugins Text to HTML ratio may vary. I checked your website and it has bunch of moving and other elements. Most of them are adding inline CSS that’s reflecting in the source page.

Having said that personally I won’t invest bulk of the focus towards optimizing HTML to text ratio as directly it does not has any effect of search result and search engines rankings. However, will focus more towards optimizing following points:

  1. Page load time: Page load time plays vital role in search rankings. Please take a look at our performance optimization guide to more information. https://theme.co/apex/forum/t/customizations-performance/210
  2. Mobile responsive: Please check if the website and it’s modules are loading properly in mobile devices.
  3. Content: Please make sure that the content is of highest quality and that it has all the necessary keywords that you think users are going to type in search engines to come on to your website.

Those things should put you in good position in terms of search rankings.

Hope that helps.

Thanks.

The client wants the SEM Rush scan to be perfect even after I reiterated your response… and the text to html ratio is the only thing.

Is there a way to link the css from all css after that* into a
< link rel=“stylesheet” type=“text/css” href=“theme.css”>

so all that css doesn’t load in the source?

Hello @Allcal,

Is there a way to link the css from ***all css after that**** into a < link rel="stylesheet" type="text/css" href="theme.css">

  • You can make use of a caching plugin like W3 Total Cache so that you can merge or combine all the JS and CSS files into one.

Hope this helps.

I wish, but this site is hosted through WP Engine and they don’t allow that plugin.

Hey There,

You may try other 3rd party plugins instead.

If your hosting does not allow you to install any WP plugins at all, it is best that you use a different hosting provider so that you can make use of the full potential of WordPress and its full features.

Regards.

I’ll ask a more specific question. I want to remove the global css that adds the css inline to every page to an external file. So i added all the css to a file https://beachcandyswimwear.com/wp-content/themes/x/css/globalcss.css. Then added

function wpb_adding_scripts2() {
wp_register_style(‘my_amazing_script2’, get_template_directory_uri() . ‘/css/globalcss.css’, array());
wp_enqueue_style(‘my_amazing_script2’);
}

add_action( ‘wp_enqueue_scripts’, ‘wpb_adding_scripts2’ );

I see the style added (image attached. I have it minified for not logged in users so you may not see it)

And then deleted the css from the global css section in the theme options.

BUT, THE CSS IS NOT BEING ADDED TO THE PAGES. Did I do something wrong?

Hi again,

You can utilize child theme for your site and move your global CSS to child theme’s style.css file – Child themes should be used for customizing your site beyond what the visual tools provide you with. Global CSS is just another option you could use. But it should not limit you, you can always use child theme’s style.css anytime. To override the styles in child theme I’d suggest you to take a look here https://theme.co/apex/forum/t/how-do-you-override-css-with-a-child-theme-wihtout-important/43855/2

Hope this helps!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.