2

Where and how should quotes be used in CSS?

width: 150px;         /* or */ width: "150px";
height: 50%;          /* or */ height: "50%";
font-family: Verdana; /* or */ font-family: "Verdana";
bestl
  • 21
  • 1

1 Answers1

11

You only need to use quotes if the property value has spaces in it. In practice, I think the only cases in which this is likely to come up are font names and URLs.

Example:

font-family: "DejaVu Sans", sans-serif;
Syntactic
  • 10,721
  • 3
  • 25
  • 25
  • 1
    in url it's not necessary http://stackoverflow.com/questions/2034575/which-type-of-quotes-we-should-use-in-css-background-url-single-double/2034587#2034587 – Jitendra Vyas May 25 '10 at 01:48