W3C home > Mailing lists > Public > www-validator@w3.org > March 2011

Re: It isn't a standard if it has hidden rules for historical reasons.

From: Philip Taylor (Webmaster, Ret'd) <P.Taylor@Rhul.Ac.Uk>
Date: Wed, 09 Mar 2011 11:55:05 +0000
Message-ID: <4D776A99.9010407@Rhul.Ac.Uk>
To: Aaron Oxford <Aaron.Oxford@objecttrading.com>
CC: www-validator@w3.org

Aaron Oxford wrote:

> I am validating the following code. Apparently it is an error for me to
> close my P tag after closing the UL tag, even in HTML5. Please tell me
> you are not still creating standards with ‘implied’ actions by tags!
> A rule like this is not only counterintuitive, but FORCES this document
> to be unparseable as XML!
> I insist that this is correct and should not fail validation!

When you say "I insist that this is correct", are you asserting
that it is correct according to W3C specification, or according
to your own mental model of what comprises a valid HTML document ?

I ask because if I take your document framework and compare it
to the W3C specification for HTML 4.01 Strict, I see that you
are endeavouring to embed a <UL> within a <P>.  This is not
consistent with the specification.  The relevant text reads :

> 9.3.1 Paragraphs: the P element
> Start tag: required, End tag: optional
> The P element represents a paragraph. It cannot contain block-level elements (including P itself).

Unfortunately the <UL> element is itself block-level, and
therefore cannot be directly contained within the <P> element.
As a result, and because the End tag is optional, your
<U> tag closes the currently open <P> element, and your
closing </P> tag is therefore orphaned.

Philip Taylor
Received on Wednesday, 9 March 2011 12:01:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:21 UTC