logoalt Hacker News

onion2klast Sunday at 3:59 PM1 replyview on HN

It indicates that the content that follows is not inside of the tag without the reader needing to remember how HTML works. Tags should have either a self-closing slash, or a closing tag.

The third way of a bare tag is where the confusion comes from.


Replies

jakelazarofflast Sunday at 4:08 PM

It doesn't indicate that, though. If you write <div />, for example, the content that follows is inside of the tag. So the reader still needs to remember how HTML works, because the slash does nothing.

show 2 replies