For those of you who may just be getting started with separating the presentation of your website from the content of your site by using cascading style sheets, understanding the difference between using id and class attributes may seem overwhelming. The id attribute provides a unique identifier for an element within the document. The class attribute classifies this element into one or more subtypes. The biggest difference between the ID and class attribute is that an ID can be used only once in a document while class can be used as many times as needed.
Chris Coyier has written an excellent article The Difference Between ID and Class