-1

Does anybody know whether the semicolon is required in a CSS -selector if there is only one command? I couldn't find in the w3c standrd.

body{color:red}

Or

body{color:red;}
Praveen Kumar Purushothaman
  • 164,888
  • 24
  • 203
  • 252
CrimsonKing
  • 95
  • 10

1 Answers1

2

No, it is not required when you only have one style defined but if you have multiple ones defined it is required on all but the last one.

Praveen Kumar Purushothaman
  • 164,888
  • 24
  • 203
  • 252
Matthew Verstraete
  • 6,335
  • 22
  • 67
  • 123