3 ms·
>It is very wrong to use closing slash in HTML Nope, it's not. In HTML5 it's just optional. From the W3C standard: >Then, if the element is one of the void e
by coldtea 12y ago
>It is very wrong to use closing slash in HTML
Nope, it's not. In HTML5 it's just optional. From the W3C standard:
>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) character. This character has no effect on void elements, but on foreign elements it marks the start tag as self-closing.
- ufo 12y agoAnd to clarify, HTML5 just codified what the browsers have always been doing. The HTML4 standards did not allow <br /> but all browsers accepted it just fine.