View Full Version : Unique ID's
Are the following id's considered to be unique?
12-26-2006, 07:43 PM
I thought it might be something on those lines
IE7 treats them both as the same whereas Firefox conciders them both unique
12-26-2006, 08:24 PM
HTML is NOT case sensitive and so if the page is HTML then they are the same.
XHTML is case sensitive and so if your page is defined and served as XHTML then they would be two different ids. IE doesn't support XHTML served as XHTML though and so the only way to get XHTML to work with IE is to serve it as HTML.
12-27-2006, 10:16 PM
HTML is NOT case sensitive and so if the page is HTML then they are the same.According to the relevant part (http://www.w3.org/TR/html401/struct/global.html#adef-id) of the HTML 4.01 specification, the value of the id attribute is case‐sensitive. That seems to mean case‐insensitive handling is a bug in Internet Explorer up to version 7; this seems to be confirmed here (http://www.webdevout.net/browser_support_html.php#support-html401-attrscore) and here (http://devedge-temp.mozilla.org/viewsource/2001/css-class-id/). According to the second secondary source, Mr J’s example code would also be invalid if both IDs were used in the same document because case‐insensitive matches are not permitted for names and IDs.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.