Performance: Linking CSS to HTML
MEDIUM IMPACT
This affects page load speed and render blocking because CSS files linked in HTML can delay when the page starts painting.
<link rel="preload" href="styles.css" as="style" onload="this.rel='stylesheet'">
<link rel="stylesheet" href="styles.css">
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Standard external CSS link | Minimal DOM impact | Blocks rendering until CSS loads | Paint delayed | [X] Bad |
| Preload CSS with onload swap | Minimal DOM impact | Non-blocking render | Paint faster | [OK] Good |