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 trialDavid Gelman
433 PointsFont 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
Martin Zarate
10,723 PointsIt 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
433 PointsDavid Gelman
433 PointsMakes sense, thanks for your reply!
Michael Cockrell
Courses Plus Student 542 PointsMichael Cockrell
Courses Plus Student 542 Pointsyeah 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!