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

HTML Introduction to HTML and CSS (2016) Adding a New Web Page Write the CSS

David Gelman
David Gelman
433 Points

Font Question: Do you really need quotes around "Arial" in the following CSS rule?

In this lesson, the teacher puts quotes around the font "Arial". I removed the quotes and the font still stayed the same Arial font. Does it matter if the quotes are included or not, or should I always use quotes when defining a font?

body { font-family: "Arial"; }

1 Answer

It is not necessary if the name of the font does not include spaces, if the font name is composed of two words or more then you need quote marks around it. Example: "Courier New" must have quote marks.

David Gelman
David Gelman
433 Points

Makes sense, thanks for your reply!

Michael Cockrell
Michael Cockrell
Courses Plus Student 542 Points

yeah its easier to start putting them in quotes from the beginning, that way you wont ever have to worry about it. if you start doing it without quotes you may end up in a situation where you are pulling your hair out trying to figure out why something isnt working and hours later you facepalm because you realize it wasnt in quotes!