3 ms·
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
by spenczar5 6y ago
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-html-element 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-head-element 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-body-element https://html.spec.whatwg.org/multipage/sections.html#the-bod...
- jimsmart 6y agoPersonally, I prefer to close all of my elements, it avoids having to worry about accidentally triggering one of these hard-to-spot edge-cases.