The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] " xyz" vs 'xyz'

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #151908

    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.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.