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

This is awesome. I love the minified markup. To think what I could have been doing with all the time I've spent closing tags and quoting attributes.


Beware: The browser may handle unclosed tags just fine, but many times your markup goes through a library first, and libraries vary in their support. For example, I found I had to close my tags when writing HTML in jQuery templates, and I found a bug in Zepto the other day with creating HTML from a string containing multiple self-closing tags (a similar practice).

After being bit those few times, I've gone back to closing all my tags (even when the w3 spec says unclosed is more correct). If I'm going to have to do it sometimes, I'd rather be consistent and do it all the time.


It is not even a new feature. It had been supported since beginning of HTML and was preserved even in HTML4.




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

Search: