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

The time to rail against self closing tags is long past. No matter how good your arguments and opinions are, it's here to stay (with and without the '/>'). There are better and more meaningful windmills to tilt against.

Sorry.



He's not asking for browsers to change, he's suggesting to developers to just stop including it because it doesn't actually do anything.

It's like putting Javascript code in HTML comments - it's totally not necessary, but some people still do it.


If it doesn't do anything - if it doesn't matter, then why care?

I mean this quite literally. Is it worth expending any time or energy on changing habits and tooling when it doesn't matter, and will probably never matter?


> If it doesn't do anything - if it doesn't matter, then why care?

Because it's confusing.

I've been doing this a long time and didn't actually know that /> is meaningless, and it would explain some random bugs I've worked around in the past.


I've seen people "fix" stuff by adding a "/>" as that's "better".

Other than that, I don't really care because as you mentioned it doesn't really matter. But the needless churn is a bit annoying at times, so not a bad thing to get the message out that it's a XHTML thing and doesn't matter in HTML.


But they aren't meaningful. They're specifically (as in, in the spec, and in implementations) meaningless.


In which case any other windmill could only be more meaningful. :)

I do get what you mean, and self-closing tags makes parsing HTML a royal pain... but it's been the status quo for decades now (self closing tags were in HTML 1.0 IIRC). It's not like they'll change it and break >90% of the internet† just to get rid of an oddity in the HTML spec.

† I do literally mean >90% - self closing tags are everywhere. They're in generated HTML, they're in manually created HTML, they're created by templating languages, and so on.




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

Search: