a very simple explanation for understanding:
---
ID is a unique and therefore can only exist only 1 time in a single html file. all the attribute that's being declare in css for ID can only be use for a single element.
CLASS is the opposite of ID. All the attribute that's being declare in css for CLASS can be use multiple times on any html elements.
---
that's the definition, both actually does work well and see no difference as u said but if u check with the web standard checker, those html which has 2 same ID in a single html will return error. That's for web standard
and is better that u differentiate ID and CLASS properly as believe me, is very useful when u do some CSS modification in the future. "changing an ID attribute wont change anything else but changing CLASS attribute will affect others"
hope my explanation is clear
