Hacker News new | past | comments | ask | show | jobs | submit login

Others have pointed out that this validates with automated tools. Here's the parts of the spec:

- "An html element's end tag can be omitted if the html element is not immediately followed by a comment." https://html.spec.whatwg.org/multipage/semantics.html#the-ht...

- "A head element's end tag can be omitted if the head element is not immediately followed by ASCII whitespace or a comment." https://html.spec.whatwg.org/multipage/semantics.html#the-he...

- "A body element's end tag can be omitted if the body element is not immediately followed by a comment." https://html.spec.whatwg.org/multipage/sections.html#the-bod...




Personally, I prefer to close all of my elements, it avoids having to worry about accidentally triggering one of these hard-to-spot edge-cases.




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

Search: