How the Browser Constructs a Frame
Before painting pixels, the browser must parse HTML into the DOM, parse render-blocking stylesheets into the CSSOM, combine them into the Render Tree, compute Layout, and execute Paint. Every synchronous stylesheet or parser-blocking script in <head> delays this pipeline.
Optimal <head> Ordering
The sequence of tags inside <head> directly governs parallel network utilization:
<meta charset="utf-8">and<meta name="viewport" ...><title>preconnecthints for critical third-party origins (such as font or API hosts)- Critical inline
<style>(if splitting above-the-fold styles) or primary stylesheet<link rel="stylesheet"> <link rel="preload">for the LCP hero image or critical WOFF2 font- Deferred scripts (
<script src="..." defer>or<script type="module">)
Script Loading Attributes Compared
| Attribute | Download | Execution Timing | Blocks HTML Parser? |
|---|---|---|---|
<script src="..."> |
Immediate | Immediate upon download | Yes (avoids) |
<script src="..." defer> |
Parallel | After HTML parsing completes, in document order | No |
<script type="module" src="..."> |
Parallel | Deferred by default, in dependency order | No |
<script src="..." async> |
Parallel | As soon as downloaded (unordered) | Pauses parser during execution |
Splitting Non-Critical Stylesheets
Print styles or below-the-fold modal stylesheets should never block initial render:
<link rel="stylesheet" href="/assets/css/print.css" media="print">
Keep your primary stylesheet modular and free of @import rules—CSS @import forces sequential round-trips because the browser cannot discover the imported file until the parent stylesheet finishes downloading and parsing.