tags:

views:

54

answers:

2

Is this HTML valid? Or is the id 'a' the same as the id 'A'?

<div id="a">alpha</div>
<div id="A">Alpha</div>
+2  A: 

Well, you can test this pretty easily... But yes, they are case-sensitive.

Shog9
+3  A: 

Yes. It is case-sensitive. Attribute values are always case-sensitive. Different browsers seem to be doing different things though.

Handling document.getElementById is different across browsers:

  1. Mozilla performs case-sensitive search.

  2. Internet Explorer: IE 8 and later performs case-sensitive search, while IE 7 and earlier performs case-insensitive search.

notnoop