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

If a good subset of developers keep the ending slash anyway, what's the point of removing it?

I used to do proper XHTML with the correct mime type. I don't anymore, but I like the syntactic ending the closing slash on a void element gives. (I also end my <p> tags, and all the rest)

I really don't understand how the author thinks it is misleading.



> I really don't understand how the author thinks it is misleading.

<img/> does what you want (which is always one thing) while <picture/> does not.

/ is a false signal, therefore misleading.


So your argument essentially boils down to: "It is only easier to read when developers write correct HTML." That isn't as "gotcha" of a rebuttal as you think it is.

It is easier to read in the common case. That's more than enough.

PS - Also a lot of IDEs will flag <picture /> with "missing closing tag" or similar.


No, my argument is that / is completely useless and is a false signal in HTML, it really is just ignored. I never argued that it makes anything easier.

An unclosed <picture> doesn't automatically become valid, but at least there's nothing suggesting that it can be done.

PS - VS Code does not. Sublime Text does not.




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

Search: