and others? Possible duplicate: Space before closing slash? Hi, If I remember ...">

Do we still need the space before the slash in <hr / "> and others?

Possible duplicate:
Space before closing slash?

Hi,

If I remember correctly, we have this in the first place, as some old version of Netscape suffocated if we did not add a space (it would seem that node never ends).

But is it really necessary today?

+3
source share
3 answers

According to the HTML5 specification , void elements do not require a self-closing character /.

Their exact expression

, void , , U + 002F SOLIDUS (/). , .

void area, base, br, col, command, embed, hr, img, input, keygen, link, meta, param, source, track, wbr

, , : html5

<hr>
<hr/>
<hr />

, , doctype

+3

XML content-type: application/xhtml+xml, . XHTML HTML, , - , , .

+4

. , .

, . , , XHTML, <br> :)

0

Source: https://habr.com/ru/post/1757222/


All Articles