Disallows elements with duplicated ID
- Rule ID:
- no-dup-id
- Category:
- Document
- Standards:
- HTML5
The ID of an element must be unique.
Rule details
Examples of incorrect code for this rule:
<div id="foo"></div>
<div id="foo"></div>
Examples of correct code for this rule:
<div id="foo"></div>
<div id="bar"></div>