News for hackers. Stuff that matters.
Re:The compiler flag that time forgot by kedean on Monday May 04, 2015 @09:14PM (#9490360)
He wasn't talking about closing void elements, he meant self-closing void tags, like <img/>, <br/>, and <hr/>. These were introduced by XHTML to fit with the idea that every tag needs to be closed. HTML5 does away with the requirement, but the HTML5 grammar does explicitly support self-closing tags (http://www.w3.org/TR/html5/syntax.html#self-closing-start-ta...). At this point, self-closing tags are more of a visual preference, as they have a negligable effect on parsing.
Re:The compiler flag that time forgot by userbinator on Monday May 04, 2015 @10:40PM (#9490603)
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.