← Back to context

Comment by immibis

9 months ago

It's sometimes done to make the same markup compatible with XHTML, without harming its interpretation in HTML.

You are either running XHTML or you are not. No need to carry any compatibility overhead. I doubt he is serving XHTML.

  • I personally prefer <input /> if only to stop other developers to not try doing <input>content </input>.

    • 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.

      1 reply →