Comment by pests

9 months ago

There are other tags you can omit the closing tag but yet the opening tag shouldn’t be self-closed.

  <ol>
    <li>one
    <li>two
  </ol>

I think even the final closing ol can be omitted as there are rules to auto close elements when encountering tags that don’t make sense in context.

I know that, but many developers don't. I can't wait to see the confusion on why my tag didn't auto-close like a <li> tag.

Ambiguity can be a dangerous thing, and not closing HTML tags can be a cause of that in my experience.