HTML IDs are NOT the same as CSS Class selectors. here are some distinct differences:
CSS class selectors, as the name implies, are almost always, if not always, used for changing the CSS styles of an element or set of elements. However, an ID can be used to add events to a specific HTML tag. These IDs can be used in client-side languages, such as JavaScript, as well as server-side languages, such as PHP or .NET. IDs are helpful in this way because they are unique to each of their corresponding HTML tags. Which brings us to the next difference.
When you set a certain ID to one HTML tag, you cannot set that same ID to a different HTML tag on this page. This is because, again, IDs are used to reference a particular element on a page. In other words, once you use a certain ID for one tag, you cannot define another tag with that same ID. However, CSS classes are made specifically to be used more than once. Classes should be used freely and in multiple locations (to a certain extent).
On the following page, you will see a few more examples on how to use class selectors.
Previous Next