Course contentsShow
← Web Development
Lesson 566 of 2,98210. Typography and Design SystemsFree lesson

Font Loading and FOIT/FOUT

Understand Flash of Invisible Text and Flash of Unstyled Text, and how browsers handle font loading by default.

Font Loading and FOIT/FOUT

What you'll learn: How browsers display text while web fonts are downloading, and the trade-offs between invisible and unstyled text.

When a browser encounters text styled with a web font (from @font-face), it faces a dilemma: the font file isn't instantly available. Should it wait for the font to load before showing text, or display something immediately?

Flash of Invisible Text (FOIT)

FOIT occurs when the browser hides text while waiting for the web font to download. The text remains invisible for a period (often up to 3 seconds in some browsers), then suddenly appears when the font loads.

Think of it like this: You're at a restaurant, and the waiter refuses to bring your food until your friend arrives. You sit staring at an empty table, waiting.

This can be jarring for users — they see blank spaces where text should be, potentially missing important content if the font is slow to load.

Flash of Unstyled Text (FOUT)

FOUT happens when the browser immediately displays text using a fallback system font (like Arial or Times), then swaps to the web font once it loads. Users see a visible "flash" as the text re-renders.

The same restaurant scenario: The waiter brings you basic bread immediately, then replaces it with your actual order when ready.

While this ensures content is readable instantly, the layout shift can be distracting.

Default Browser Behavior

Different browsers historically handled this differently. Modern browsers typically use a block period (brief FOIT, ~100ms) followed by a swap period (showing fallback font). This balances instant readability with brand consistency.

Understanding this default behavior is crucial because fonts directly impact both user experience and perceived site performance.

Key Takeaway: FOIT hides text while fonts load (invisible), FOUT shows fallback text first (layout shift), and browsers use mixed strategies by default to balance readability and brand appearance.