Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
minus7
on July 6, 2023
|
parent
|
context
|
favorite
| on:
The case against self-closing tags in HTML
`<div />` getting parsed as opening tag instead of self closing is a bug (be it in the browser or in the spec) and should be fixed
pornel
on July 6, 2023
|
next
[–]
It's been fixed. Send Content-Type: application/xhtml+xml and it will be parsed as an empty tag. But nobody brothers to turn that on. Without an opt-in it's unfixable due to backward compatibility.
the_mitsuhiko
on July 6, 2023
|
prev
[–]
Why would it be a bug in the spec? “/“ is just a parsing error in html and is ignored.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: