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

CSS CSS Basics (2014) Understanding Values and Units Fonts and Line Height Review

Default font

On the Quiz, I chose True for the question as to whether the user needs to have the fonts we use installed on their machines to view our site. I thought that as long as we chose sans-serif as the final default all browsers would be able to display readable content?

2 Answers

It will be able to display readable content, but it won't display the font you've chosen to display.

Being able to show custom fonts the user needs it installed on his machine, but that's rarely the case. So we use @font-face to include the font in our website. More specifically our CSS document.

defining sans-serif is just a fallback, just to make sure the user can actually read something. But it won't create the visual effect you wish.

In other areas of the courses (I think it's design a simple website but don't quote me on it) they routinely use web based fonts to deliver exactly the right font to the user. This might incur a small performance hit overall (arguable given that its Google's grunt delivering it) but the important thing is it's absolutely predictable. Your design remains consistent and doesn't break and everyone's happy. It also works the other way around in that you can design a site with a particular font in mind without worrying about how or where you're going to get it.