Monday, February 12, 2007

Class Vs. ID in CSS

I've had this question in mind of several years by now. What is really the difference between using ID and using class in CSS. I Googled it for years but just couldn't get it despite reading the many attempts to answer this question. Still I did not completely comprehend the difference between using them and why we needed two different methods in CSS to for styling.

That was until I got, by chance, across the most clearly stated answer I have ever seen. Here is the difference between ID and class in CSS. Not only does this make clear the difference between them, but it also gives direction to when to use each.