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 Enhancing Design with CSS Styling Text Importing Fonts

Nik Oaks
Nik Oaks
8,056 Points

Why do we use an apostrophe instead of quotation marks when referring the the font-family.

I am curious as to why we do this instead of formatting it with quotation marks like everything else.

2 Answers

Rohald van Merode
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Rohald van Merode
Treehouse Staff

Hi Nik Oaks 👋

Great question! You can use either an apostrophe or the quotation marks. Both will be working exactly the same and it's a matter of personal prefference which one you're using 😄

James Tickett
James Tickett
5,149 Points

I had a little Google for this before checking the questions on here, and I found a really handy answer from somewhere else on Team Treehouse!

Other answer posted here

"The quote types are interchangeable, as long as they are used in matching pairs.

But it is a good practice to use one type consistently. Some style guides indicate a preference for one or the other, usually double quote (").

Google style guide recommends double quotes (") for HTML, and single(') for CSS. But then they're not totally consistent with that even in their own documentation. :wink:"

So it seems either is fine but best practice is single quotes for CSS, and double for HTML.