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 Foundations Text, Fonts, and Lists Font Properties

Rachit Agarwal
Rachit Agarwal
6,235 Points

Why is this wrong?

For "create a new font stack using baskerville, times new roman, times, serif" I have:

p {
  font-family: baskerville, "times new roman", times, serif;
}

It says it's wrong, what is it supposed to be? Thanks!

3 Answers

Quotation marks and capitalization is important in this case:

p { font-family: "Baskerville", "Times New Roman", "Times", serif; }

Rachit Agarwal Removed all your duplicate posts :)

You need to capitalize the names of the fonts for this question see the code below.

/* Complete the challenge by writing CSS below */

p { font-family: Baskerville, "Times New Roman", Times, Serif; }
James Barnett
James Barnett
39,199 Points

Adam Sackfield -

Interesting you actually shouldn't need to capitalize font names.

I made a test case on codepen

If inspect the test text both of them are being rendered with Baskerville.

You can also check out - Eric Meyer's font name test case page

further reading

> For authors this means that font family names are matched case insensitively, whether those names exist in a platform font or in the @font-face rules contained in a stylesheet.