Performance
HTML size: ship lighter markup
Heavy HTML takes longer to download and parse. We count markup without scripts and styles: up to 100 KB earns full points, over 300 KB earns none.
- Category
- Performance
- Points available
- 7 pts · 4 with PageSpeed
- Effort
- Medium effort
Why it matters
The browser must download and parse the HTML before it can show the page. Oversized markup slows that down, especially on mid-range phones and slow connections.
Bloated HTML usually means repeated inline SVGs, huge mega menus, hidden duplicate content for mobile and desktop, or base64-encoded images. All of it is downloaded on every page view and cannot be cached separately.
How we measure it
We take the HTML of the page and remove the contents of every <script> and <style> block, then measure what is left in bytes (uncompressed). Inline JavaScript and CSS are not counted here; inline SVGs, data URIs and repeated markup are.
With PageSpeed data the check is worth fewer points, because the real loading metrics are scored as well.
| Result | Without PageSpeed | With PageSpeed |
|---|---|---|
| 100 KB or less | 7 | 4 |
| 100-300 KB | 4 | 2 |
| More than 300 KB | 0 | 0 |
Performance weights change when PageSpeed Insights data is available: TTFB, HTML size and redirects then share the 22 performance points with LCP, CLS and INP.
How to fix it
- Move repeated inline SVG icons into one sprite file and reference them with
<use href>. - Replace base64
data:images with normal image files that the browser can cache. - Do not render the same menu or content twice for mobile and desktop. Use one markup and CSS to change the layout.
- Paginate or lazy-load very long lists (product grids, comments) instead of printing hundreds of items at once.
- Remove leftover page-builder wrappers, hidden sections and HTML comments.
Copy-paste fixes
<!-- Before: the same 4 KB inline SVG repeated in every product card -->
<svg viewBox="0 0 24 24"><path d="M7 18c-1.1 0-2 .9-2 2s.9 2 2 2 ..."/></svg>
<!-- After: one cached sprite file, referenced by id -->
<svg width="24" height="24" aria-hidden="true"><use href="/icons.svg#cart"></use></svg>
<!-- Before: image embedded as base64 -->
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..." alt="Team photo">
<!-- After: a normal, cacheable file -->
<img src="/img/team.webp" alt="Team photo" width="800" height="533" loading="lazy">Common mistakes
- Hiding content with
display:noneand thinking it costs nothing. It is still downloaded and parsed. - Inlining the full SVG logo and icon set on every page.
- Relying on gzip alone. Compression helps transfer time but the browser still parses the full markup.
Test your site now
Put your site against a competitor and see how many of these points you earn, and which fixes pay off first.