Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

At this point, self-closing tags are more of a visual preference, as they have a negligable effect on parsing.

In fact they can be said to have no effect on parsing HTML itself, as the only time when self-closing makes any difference is when the tag's name isn't one that HTML defines - what the spec calls "foreign elements" (e.g. inline SVG or MathML). Those will close when their tag is self-closing, but the closing behaviour of HTML tags is hardcoded in the parser.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: