- This topic is empty.
- The forum ‘CSS’ is closed to new topics and replies.
Beginner here: What is the difference and why?
So I’m learning how to write css and all of its glory. I have noticed that some times I see values in a single quotation mark while others have a double. Does it make a difference? If so, why?
Ex: font: bold 12px ‘Lucida Grande’, Verdana, sans-serif;
While other times I’ve seen the same line of code but in double quotation marks.
Thanks for the help-
In css, you can both use quote (‘) or double-quote (“) there is no real difference.
The only difference is if you wish to escape, if for some reason the value have a quote in it, and you use quote you will have to escape it (ex: font-family: ‘quo\’ted font’) but if you use double quote, you won’t have to escape it (font-family: “quo’ted font”)
Both methods can be applied.
It depends on the individuals , some follow double quotes as their styles,
others follow single quotes.
Both represent the values.