Has anyone come across a browser where the custom attribute was not working?

The web application that runs the application has several custom HTML element attributes to store the output.

Only happens here and there, and so far I haven't noticed anything wrong with the way the page is rendered in IE7, IE8, FF 3.5 and Chrome 3.

I would like to assume that everything will be fine, but just want to check if anyone has had a problem with custom attributes in other browsers.

I realize this is not part of the standards for adding custom attributes, but what matters to me is how the page is displayed to clients.

+2


source to share


3 answers


Browsers silently ignore tags or tags they don't understand, which is why you're good. However, your HTML will not validate (I know you said you didn't care, but still) plus there are other possible implications.



See this question for details .

0


source


html5 supports custom attributes with names starting with "data-". Using these features is the least likely to break anything in the future.



+1


source


Just remember to use the same case when referencing an attribute in your code. I have had problems in the past where Internet Explorer was returning null using getAttribute because my case did not match what was defined in markup or earlier in code.

0


source







All Articles