Font-family quotations


#1

https://www.codecademy.com/courses/learn-html-css/lessons/css-fonts/exercises/font-family?action=lesson_resume

I am confused as to why I was getting a error when putting the font-family in quotations, but non-quoted worked. in the example it has quotations around the font-family.



font-family: "Georgia";

vs.

font-family: Georgia;   or   font-family: 'Georgia'


#2

You only need to put the font-family name inside quotation marks if it has more than word.
So, if you want to use the font-family Playfair Display you need to put it inside quotation marks, like this:
font-family:“Playfair Display”

If your font-family has only one word, you don’t need quotation marks, for example:
font-family: Georgia


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.