-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
  • 160,666
  • 24
  • 190
  • 242

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
  • 160,666
  • 24
  • 190
  • 242
Matthew Verstraete
  • 5,958
  • 21
  • 63
  • 113