News for hackers. Stuff that matters.
Re:You are not required to close your <p>, <li>, <img>, or <... by vbezhenar on Sunday January 11, 2026 @06:04AM (#46574484)
> why would you ever want to not close tags?

Because browsers close some tags automatically. And if your closing tag is wrong, it'll generate empty element instead of being ignored. Without even emitting warning in developer console. So by closing tags you're risking introducing very subtle DOM bugs.

If you want to close tags, make sure that your building or testing pipeline ensures strict validation of produced HTML.

There are no comments on this comment yet.