Font family: playfair display


#1

https://www.codecademy.com/courses/learn-html-css/lessons/css-fonts/exercises/more-fonts?action=resume&link_content_target=interstitial_lesson

Why we need a "" element to include playfair display when we use this font family?
To be more specific, why the code here is 'font-family: "playfair display", serif;' not just 'font-family: playfair display, serif'?


#2

I think in this particular case
it is required to make it easier for the =code-checker=

Officially
https://developer.mozilla.org/en-US/docs/Web/CSS/font-family
both options are valid.

In discussions the trend is to always to enclose in quote's
https://stackoverflow.com/questions/7638775/do-i-need-to-wrap-quotes-around-font-family-names-in-css?noredirect=1&lq=1
https://stackoverflow.com/questions/15228792/when-should-css-font-family-value-use-quotes


#3

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