Disallows void element with content (void
)
HTML void elements cannot have any content and must not have an end tag.
Foreign elements will always be ignored by this rule.
Deprecated: This rule is deprecated. It has been replaced by the rules void-content
, void-style
and no-self-closing
.
Rule details
Examples of incorrect code for this rule:
<fieldset>
<input/>
</fieldset>
<img></img>
Examples of correct code for this rule:
<fieldset>
<input>
</fieldset>
<img>
Options
This rule takes an optional object:
{
"style": "omit"
}
Style
omit
requires end tag to be omitted and disallows self-closing elements (default).selfclose
requests self-closing any void element.any
allows both omitting and self-closing elements.