Classes are used when you think you're going to use that style multiple times in multiple places on the page. For example, you might want to highlight abbreviations on a page. Some pages might have 1 abbreviation, some have 10, and others have none. When you write the abbreviation class, you give yourself the option to have multiple elements using that class on any given page.

The only time I would change a class to an ID is if I needed the ID to act as a specificity marker or an anchor on the page as well.

Posted in: CSS

Related FAQ's

Marius Ion ANGEL HOT SOFT LLC (800) 316-7677