W3C home > Mailing lists > Public > www-validator@w3.org > June 2017

Re: Closed </li> element

From: Jens Oliver Meiert <jens@meiert.com>
Date: Fri, 30 Jun 2017 12:35:26 +0200
Message-ID: <CAJ0g8QT0c-EfZc4qiUF9fi645vHbBnTBC9TLip3Qikw2Jt-9ww@mail.gmail.com>
To: hexel@tut.by
Cc: W3C WWW Validator <www-validator@w3.org>
> I have found an issue. Validator does not pay attention to unclosed <li>
> element if it goes after closed </a>.

It does, it’s just perfectly valid HTML. A parser would automatically
“close” this element just before the next opening <li>.

See https://html.spec.whatwg.org/multipage/syntax.html#elements-2 for
more details (look for “omitted”).

(Omitting *all* optional tags can be a very effective way of
simplifying HTML, but it’s not a wide-spread practice.)

-- 
Jens Oliver Meiert
https://meiert.com/en/
Received on Friday, 30 June 2017 10:36:19 UTC

This archive was generated by hypermail 2.3.1 : Friday, 30 June 2017 10:36:26 UTC