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

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