What's the difference


#1

In stylesheet.css, it was both right to use:
span {color:blue;} and span {color:blue}
I wonder the role of ";"


#2

nothing, a single property + value doesn't require a semi-colon, i would still put it there.

Earlier today i helped someone on the forum (here on codecademy) and he didn't add a semi-colon to his last property + value, then added another property + value, that creates problem, in case this is unclear, here is it in code. he started witth:

selector {
  property: value;
  property: value;
  property: value
}

as you can see, no semi-colon after the last value. Which is fine, but then he added another property:

selector {
  property: value;
  property: value;
  property: value
  property: value
}

now you do have a problem, both the last and forlast value do not have a semi-colon, this will create a error message on codecademy.

So, while a single property + value the semi-colon doesn't matter, i would add it, to prevent this kind of problem


#3

thank you, I'm clear now :smile: