Not only does IE6 not support the HTML5 Data Attribute feature, in fact virtually no current browser supports them! The only exception at the moment is Chrome.
You are perfectly at liberty to use data-geoff="geoff de geoff"
as an attribute, but only Chrome of the current browser versions will give you the .dataGeoff
property.
Fortunately, all current browsers - including IE6 - can reference unknown attributes using the standard DOM .getAttribute()
method, so .getAttribute("data-geoff")
will work everywhere.
In the very near future, new versions of Firefox and Safari will start to support the data attributes, but given that there's a perfectly good way of accessessing it that works in all browsers, then there's really no reason to be using the HTML5 method that will only work for some of your visitors.
You can see more about the current state of support for this feature at CanIUse.com.
Hope that helps.