-
Notifications
You must be signed in to change notification settings - Fork 22.8k
Description
In my latest PR, I noticed that the [mdn-linter] is "correcting" tags like <img ...>
to <img ... />
. It... really shouldn't.
The standard, on the use of trailing /
characters in (void element) start tags:
Then, if the element is one of the void elements, or if the element is a foreign element, then there may be a single U+002F SOLIDUS character (/), which on foreign elements marks the start tag as self-closing. On void elements, it does not mark the start tag as self-closing but instead is unnecessary and has no effect of any kind. For such void elements, it should be used only with caution — especially since, if directly preceded by an unquoted attribute value, it becomes part of the attribute value rather than being discarded by the parser.
Originally posted by @ferdnyc in #40337 (comment)
"it does not mark the start tag as self-closing but instead is unnecessary and has no effect of any kind. For such void elements, it should be used only with caution"