html id selectors vs other kinds of selectors

JoelB

New Member
I heard that id selectors are unique in that there can only be one element with a certain ID name on a page. In practice this does not seem to be true at all when selecting elements by their id in javascript and css, neither the libraries or the browsers seem to care, are there any remaining consequences of having multiple elements with the same id, such as a browser that is much more strict about this and won't load a page if there are elements with the same id?I would be content if the saying simply wasn't true that "elements must have unique ids"
 
Back
Top