A Class definition can be used several times throughout your document, while an ID can only be used once. If you have a style that you want to apply several times throughout the document, you need to use a Class. However, it if only want to apply the style once (for instance, to position a particular element, such as a banner) you should use the ID. This is an especially important rule to follow if you plan to do any scripting on your page.
Rate This Article
You must be signed in to rate articles.