Re: [www-validator] <none>

> Thank you for this information. I wasn't aware the body tag was optional or
> the html tag for that matter. I am sure there is some good reason for this,
> but it seems inconsistent.

The sample document is inconsistent in its closing of elements,
however the specs aren’t that inconsistent once one considers HTML
parsing rules (for example, an <li> start tag really implies that
before it, any other <li> element must close).

There probably are additional overviews over optional tags but see
https://meiert.com/en/blog/optional-tags-in-html-4/ for an impression.
When omitting optional tags it seems useful to do so consistently and
omit all of them (unless there is ambiguity as with scenarios like
<p><img> vs. <p></p><img>, where the latter produces an anonymous
block element rendered differently from the former).

-- 
Jens Oliver Meiert
https://meiert.com/en/

Received on Thursday, 21 September 2017 13:14:18 UTC