Simple HTML code example:
<p>font family</p>
Simple CSS code example:
p {
font-family: Arial, Helvettica, sans-serif;
}
- Browser looks for
Arial
Arial
is not present then it looks forHelvettica
Helvettica
is not present then it looks forsans-serif
Questions
- What will happen if browser does not find any these font families?
- If the browser uses a default font, what font does it use?
t
.sans-serif
is a "generic" font family, there is no font called "sans-serif" (which you seem to imply). The default "sans-serif" font is set (and is customisable) in the browser. Arial and Helvetica are both sans-serif fonts. The default sans-serif font is likely to be Arial on Windows and Helvetica on OS X. See also webmasters.stackexchange.com/questions/33793/…