Disallow end tags from having attributes

Rule ID:
close-attr
Category:
HTML Syntax and concepts
Standards:
  • HTML5

HTML disallows end tags to have attributes.

Rule details

Examples of incorrect code for this rule:

<div></div id="foo">
error: Close tags cannot have attributes (close-attr) at inline:1:12:
> 1 | <div></div id="foo">
    |            ^^


1 error found.

Examples of correct code for this rule:

<div id="foo"></div>