CSS CSS Basics The Box Model Margins

font stacks:

i noticed that when doing font stacks, even if I don't put a default fallback font...the browser still displays text if the imported fonts aren't compatible. why than are we supposed to include a default fallback font?

1 Answer

Hey John,

The reason why we use a font stack with a default font is to keep the typeface inline with what is happening on the page. If we don't specify a fallback font to be used, the browser will default to whatever font it wishes. Perhaps you have some cool effects going on with a serif font, but the imported fonts don't show up (and there's no fallback) so the browser decides to display the fonts with a sans serif font. Your effects would be off and wouldn't look right. And that's just one case. At least with a fallback font, your typeface will be inline with the typeface of the imported fonts.