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

HTML How to Make a Website Styling Web Pages and Navigation Style the Portfolio

Wang Lei
Wang Lei
2,766 Points

how to understand the 'sans-serif' code in property font-family?

Hi there,

What's the specific meaning on 'sans-serif'?

4 Answers

Konstantinos Chantzis
Konstantinos Chantzis
3,273 Points

SANS-SERIF is a generic type of fonts. When you specify the "font-family: 'Changa One', sans-serif;" in your css, you tell the browser to use 'Changa One' as the font family. If it doesn't exsist in the computer system use a generic sans-serif font. There are also other generic type of fonts like Serif fonts, display fonts, monospace fonts and handwriting fonts.

Wang Lei
Wang Lei
2,766 Points

yes? when I type the font-family, why 'Changa One', sans-serif? or sometimes, 'Changa One, cursive? What does that mean? Just two different fonts?

Thanks.

Changa One is in brackets as there are two separate words in the name of the font and some fonts can have the attribute cursive which means the characters are joined together. :) Hope this helped if you have any other questions let me know :)

sans-serif is the name of a font :)