@html-eslint/require-closing-tags
Require use of closing tag.
Rule Details
This rule checks whether the tag has closing tag or not.
๐ Examples of incorrect code for this rule:
<div>
๐ Examples of correct code for this rule:
<div></div>
Options
This rule has an object option for Void Elements.
"selfClosing": "never"
: (default) disallow using self closing tag on Void Elements."selfClosing": "always"
: enforce using self closing tag on Void Elements.
selfClosing : "never"
๐ Examples of incorrect code for the { "selfClosing": "never"}
option:
<img />
<base />
๐ Examples of correct code for the { "selfClosing": "never"}
option:
<img>
<base>
selfClosing : "always"
๐ Examples of incorrect code for the { "selfClosing": "always" }
option:
<img>
<base>
๐ Examples of correct code for the { "selfClosing": "always" }
option:
<img />
<base />