2 ms·
<p>You can get a kind of self-close with this. <p>Although it only works on some elements.
by threatofrain 3y ago
<p>You can get a kind of self-close with this.
<p>Although it only works on some elements.
- extra88 3y agoThey're referring to the use of the trailing slash in examples like this: <input type="text" inputmode="numeric" /> Such slashes were mandatory in XHTML for such elements but aren't a thing in HTML. They're also not invalid, the HTML validator says "Info: Trailing slash on void elements has no effect and interacts badly with unquoted attribute values."
- couchand 3y agoThe trailing slash itself is not invalid, per se, but it'a very hard for any following markup to be valid unless the element is void. A particularly nasty one is any attempt to use a supposedly self-closing script tag: <script src="..." /> This results in the rest of your page being interpreted as code. Oops!