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

HTML5 is a huge improvement over the HTML4.01/XHTML madness that was going on back in the day. And it's fine with me to allow non-closed singleton tags.

There's perhaps no strong logical argument either way, but from a style perspective, I prefer to use closing slashes to make it absolutely clear what's going on.



Allowing the void tags to be unclosed is the lesser evil of the two, I can even accept the argument behind it (they can't have content) even though it complicates the syntax.

The really evil one is to not make <div /> be exactly equivalent to <div></div> which is just batshit crazy. When I want a placeholder tag (to be populated later) I have to write <div></div> which feels completely unnatural,


Seems simple to me, a container element should always have opening and closing tags. An element that will never contain anything is self-closing.

But I admit, I suppose it could only be simple to me.




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

Search: