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

Fedor Andreev
Fedor Andreev
6,438 Points

Stuck on, "finally italicize the text in the paragraph"?

What am I doing wrong?

p { font-style: italic; }

2 Answers

Richmond Lauman
Richmond Lauman
28,793 Points

Hi Fedor. Remember that in the previous questions for that quiz they also asked you to create a rule for the font family stack used in the paragraph element. Try including the rule for the font-family rule and your font-style rule which is correct) within the same declaration for the p element. Like so:

p {
  font-family: Baskerville, Times New Roman, Times, Serif;
  font-style: italic;
}
ANTONIO ALTAMIRANO
ANTONIO ALTAMIRANO
9,428 Points

you could also define it all in one font. p {font: italic 5px Baskerville, "Times New Roman", Times, serif;} when i first entered it i did not include the font-weight of 5px. I forgot about that small rule. In any case I entered a font-weight and the answer was accepted. Guil explains it close to the end of the first video.