Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.