Disallows duplicated attributes on same element
- Rule ID:
- no-dup-attr
- Category:
- HTML Syntax and concepts
- Standards:
- HTML5
HTML disallows two or more attributes with the same (case-insensitive) name.
Browsers handles duplication differently and thus this is a source for bugs.
Rule details
Examples of incorrect code for this rule:
<div class="foo" class="bar"></div>
Examples of correct code for this rule:
<div class="foo bar"></div>