How to fix: Pages with low text-HTML ratio
If you’re seeing a low text-to-HTML ratio warning in your Semrush Site Audit, it means your page has more code than meaningful content.

Example of a Semrush site audit highlighting 316 pages flagged for low text-HTML ratio.
This can slow down load times and make it harder for search engines to understand what your page is actually about.
7 ways to fix a low text-HTML ratio issue on your website
1. Minimize HTML Code
Too much markup can weigh a page down.
- Remove unnecessary inline styles, scripts, and empty tags.
- Clean up redundant DIVs, comments, and extra whitespace.
- Use your browser’s developer tools (Inspect → Elements) to identify bloated or unused markup.
Back in the day I used to have to manually delete every single empty line and whitespace using Window’s Notepad – but no more! Check out my favorite minimize html code tools: Online HTML Minify Tool and HTML Minifier Tool and Compressor from Toptal.
2. Optimize CSS and JavaScript
Large CSS or JS files often inflate the HTML-to-text ratio.
- Use external stylesheets and scripts instead of inline code (let’s be honest, inline code is so 2000).
- Minify assets with free WordPress plugins like Autoptimize, WP Rocket, or Asset CleanUp Pro.
- Defer or async-load noncritical scripts to keep the DOM lean.
When you’re playing with caching plugins, be sure to re-test after each setting you enable/disable. Depending on your setup, you may need to clear your site or server cache as well.
3. Add More Quality Content
A thin page will always have a low text ratio — even with clean code. Shoot, even with no code!
- Add relevant, helpful content that supports your target keywords.
- Use proper HTML structure (H2s, H3s, paragraphs, bullet lists) to boost readability and semantic value.
- Include examples, FAQs, or visuals to keep visitors engaged.
Want to give your new content more structure? Add schema markup to help Google better understand your pages and improve how your site appears in search results.
4. Optimize Media
Large or excessive media files can throw off your text-to-HTML ratio and slow down your site — even if your code is perfectly clean.
Every oversized image, background video, or unused media file adds unnecessary weight to your page.
Don’t forget your cell phone or mobile device may show a different hero image or video than desktop – so you may need to make two separate optimizations.
Start by compressing and resizing images before uploading them.
Tools like Smush, ShortPixel, or TinyJPG can automatically optimize file sizes without visibly reducing quality. Keeping images sharp while cutting load times drastically.
Next, enable lazy loading for all images and videos. This ensures that only the media visible on-screen loads initially, while everything below the fold waits until the user scrolls down.
It’s an easy win for performance and improves Core Web Vitals like Largest Contentful Paint (LCP).
Keeping your media lean helps maintain a healthier text-to-HTML ratio and speeds up your overall site performance.
5. Remove Excess Plugins and Widgets
Plugins can inject unnecessary code into your page output.
- Deactivate anything that doesn’t add direct user or SEO value.
- Avoid overusing page builders or third-party widgets that generate complex markup.
See how I improved a client’s site with a 38% plugin reduction and faster load times on my website maintenance page.
6. Use a Clean Theme
Your theme defines much of your HTML structure.
- Choose a lightweight, SEO-friendly theme like Astra, GeneratePress, or Kadence.
- Avoid themes with built-in sliders, animations, or shortcodes you don’t use.
- Don’t rely on page builder plugins – too many include more bloat than a PC from Best Buy.
7. Validate HTML
Broken or outdated HTML increases code bloat.
- Run your page through the W3C Validator to find and fix errors.
- Keep your theme and plugins updated to ensure compliance with modern standards.
See how your changes impacted performance
After cleaning up your code and adding more meaningful content, it’s time to see if those fixes actually made a difference.
Run another Semrush site audit and compare the before-and-after results for your low text-to-HTML ratio issue. You should see fewer affected pages — and ideally, faster load times too.
Use popular tools like PageSpeed Insights and GTmetrix to dig deeper.

The GTmetrix dashboard where users can test website performance, identify speed issues, and track optimization results.
These tools can show whether your page structure is now more efficient and whether metrics like Largest Contentful Paint (LCP) and First Contentful Paint (FCP) have improved.
If your text-to-HTML ratio has increased but performance hasn’t, double-check your scripts, plugins, and server settings — sometimes, the bottleneck isn’t the code but what’s running behind it.
Remember, improving this ratio alone won’t skyrocket your rankings, but it will help Google focus on your content instead of your clutter, making your site easier to crawl and improving overall user experience.





