HTML & CSS · Junior · Question 70 of 75

Why end a font-family list with a generic family like sans-serif?

font-family: "Inter", "Segoe UI", sans-serif;

Explanation

Fonts are tried left to right per character. Without a generic family you may get the browser default (often a serif) on systems missing your fonts.

Further reading

Problem with a question

HTML & CSS · Junior · question 70

Test yourself

Take the HTML & CSS · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz