Performance: SEO-friendly HTML
MEDIUM IMPACT
SEO-friendly HTML affects how quickly search engines can crawl and index your page, impacting your site's visibility and ranking.
<header><h1>Welcome to our site</h1></header>
<div><div><div>Welcome to our site</div></div></div>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Non-semantic <div> nesting | High (deep tree) | Multiple reflows | High paint cost | [X] Bad |
| Semantic tags with clear hierarchy | Low (shallow tree) | Single reflow | Low paint cost | [OK] Good |
| Empty alt attributes | N/A | N/A | N/A | [!] OK but poor SEO |
| Descriptive alt attributes | N/A | N/A | N/A | [OK] Good SEO |
| Inline styles and scripts | Moderate | Blocks rendering | Moderate paint | [X] Bad |
| External CSS and deferred scripts | Low | Non-blocking | Low paint | [OK] Good |