IT lexicon › Web › CSS Priority

CSS Priority

Web På svenska → Updated: 2026-11-16

The strategy of identifying which CSS is needed for initial render and loading it first, deferring the rest.

A common performance trap: a large monolithic CSS file blocks rendering on every page even though most of it won't be used until the user scrolls or interacts. Modern CSS priority splits styles into "above-the-fold" (inline in `

` or load first) and "nice-to-have" (lazy-load later). Tools like PurgeCSS and Tailwind CSS minimize output by including only styles that are actually used in the source code.

Even a well-written 50 KB stylesheet is better split than shipped whole. Inline 2–4 KB of critical styles, link the rest with `rel="preload"` or load it asynchronously via JavaScript. Modern CSS frameworks now default to this strategy because it measurably improves first paint times.

← Back to the lexicon