Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
John Park
4,368 PointsWhat is the difference between using Web Fonts vs fonts you set in for example body or any other selectors in CSS?
What is the difference between using Web Fonts vs fonts you set in for example body or any other selectors in CSS?
1 Answer
Jason Anders
Treehouse Moderator 145,863 PointsHey John,
There are thousands of fonts available, but most devices only have a fraction of these installed locally. If you are just using common and popular fonts, you'll be able to just declare in the CSS. To use premium or specialized fonts, it's almost certain that the font will not be available on a person's device. This is why when you specify fonts, you usually declare more than one. If the main one is not available on the user's system, it goes to the next, and so on until one is found or the default is used.
When you use a web font, you are basically providing the font file for the user to access (much like your JS files). So, the font you want will render on the user's system regardless of whether or not they have the font installed locally.
So, bascially, just because you "set" a font does not mean that it will render on the user's system.
Hope this helps. :)
John Park
4,368 PointsJohn Park
4,368 PointsThank you Jason!