Can multiple HTML elements have the same ID if they\'re of different element types? Is a scenario like this valid? Eg:
div#foo
span#foo
a#foo
And for what it's worth, on Chrome 26.0.1410.65, Firefox 19.0.2, and Safari 6.0.3 at least, if you have multiple elements with the same ID, jquery selectors (at least) will return the first element with that ID.
e.g.
first text for one
second text for one
and
alert($('#one').size());
See http://jsfiddle.net/RuysX/ for a test.