1

I found people wrote CSS like

h1 {font-family: "Helvetica Neue"}
h1 {font-family: 'Helvetica Neue'}
h1 {font-family: 'Roboto'}
h1 {font-family: Roboto}

I saw most of the people use ' more and 'Roboto' more than Roboto.

Is there even any tiny difference?

BTW, I asked this question because I saw this on Google Fonts:

enter image description here

If there's no difference, why does Google bother adding a ' in it?

AGamePlayer
  • 7,404
  • 19
  • 62
  • 119

1 Answers1

2

You can always put a specific font family name in quotes, double or single, so Roboto, "Roboto", and 'Roboto' are equivalent. Only the CSS-defined generic font family names like sans-serif must be written without quotes.

Contrary to popular belief, a font name consisting of space-separated names such as Helvetica Neue need not be quoted. However, the spec recommends “to quote font family names that contain white space, digits, or punctuation characters other than hyphens”

Keivan Sina
  • 608
  • 5
  • 21