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 How to Make a Website Customizing Colors and Fonts Add Fonts

Temidayo Ogidan
Temidayo Ogidan
4,189 Points

Won't accept my code

It won't accept my code even though it is:

h1 {

font-family: 'Open Sans', 'sans-serif'; }

Am I missing something?

2 Answers

You only quote values if there's a space in between them.

h1 {

font-family: 'Open Sans', sans-serif;
 }

Remove the quotes from around sans-serif.

James Barnett
James Barnett
39,199 Points

> You only quote values if there's a space in between them.

You also need to use quotes for font names that contain "digits, or punctuation characters other than hyphens"

from the CSS spec: http://dev.w3.org/csswg/css-fonts/#font-family-prop