OverRide
Members
-
Joined
-
Last visited
Reputation Activity
-
Upon reading all the comments that relate to the use of ID's and Classes I did a lot of research. Very little of the research concentrated on whether one is used for styling or behavior. On the other hand the most basic of use for ID versus Class is that an ID is a unique tag while a Class is a "blueprint" tag. Only one ID with a given value can exist on a page at any given time, while a class can exist on ALL elements if you wanted. This was a huge chunk of information that htmldog dot com DIDN'T go over that would have been useful knowledge. So to sum up what I've learned....
if you want to target a certain element inside a group of them ( like one <li> out of a bunch of them ) you would use and ID, but if you want to target a bunch of elements to apply the same style to, then a Class is used.
EDIT: well there is a special use for ID in browsers.
http://yourdomain.com#comments, the browser will attempt to locate the element with an ID of "comments" and will automatically scroll the page to show that element.