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

Hannah Ray
Hannah Ray
1,109 Points

CSS Code Challenge

Hi Guys,

I have a challenge that I seem to be having a problem with.

It is as follows:

"In your CSS, apply your font to the first level headline using font-family. Include a sans-serif fallback."

So in the CSS file I am entering:

"h1 { font-family: 'Ubuntu Condensed', 'sans-serif'; }"

The link is in index.html - that was the first part of the challenge. It's giving me an error message saying that I need to include Sans Serif as a fallback - which I have?

Confused! What am I missing?

Thanks! H

4 Answers

Sans Serif is wrapped in apostrophes when it doesn't need them. Your code should look like this

h1 {
   font-family: 'Ubuntu Condensed', sans-serif;
}

Hope this helped!

Did you try it without the single quotation marks? h1 { font-family: Ubuntu Condensed, sans-serif; }

Hannah Ray
Hannah Ray
1,109 Points

Thanks guys! I knew it would be something simple :)

I took the apostrophes off of sans-serif and it worked.

Thanks for your help!

Sean T. Unwin
Sean T. Unwin
28,690 Points
  • serif, sans-serif, cursive, monospace, and fantasy are font keywords -- they can NOT have quotes.
  • Fonts that are single words or have no spaces, no special characters, no numbers -- They do NOT have quotes.
  • Fonts that DO have multiple words, spaces, special characters, numbers -- They DO need quotes.