My question is simple
How many custom attributes we can use in a element e.g
<input value="1" vcFlag="true" name="example" />
I am using vcFlag=”true” as custom attribute how many attributes like this I can put in this input element. Is there any limit or not.
thanks
There is no (theoric) limit to the number of attributes you can add to a HTML tag:
Attribute parsing is slower than node parsing so if you use a huge number of custom attributes you may slow down page parsing, specially on some old browsers.
Just rmember to prefix them with
data-to be HTML 5 compatible: Data Attributes on W3C Working Draft.In your case it should be: