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

> Self closing tags have no place in HTML.

...in your opinion. In my opinion, you're wrong. Closed tags and valueless attributes have no place in HTML. Your example for the script tag actually follows the XHTML standard which states that elements whose content model is not EMPTY do not use the minimized form. However, if enough people really have a big enough problem with this, I think we should change the standard to allow self closing script tags. (And apparently they already work in Chrome and some other browsers.)

Given that there are clearly a number of people whose opinion differs from yours and the fact that HTML is an open standard...I think the current compromise as stated in the HTML5 standard (optional self closing tags) should be acceptable to any reasonable person.

(edit: Also, don't ever use React from Facebook if you don't like self closing tags because (since they had to write a parser) they require all tags to be closed or self closed. Consistent, unambiguous formatting is just that much easier to parse.)



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

Search: