W3C home > Mailing lists > Public > www-validator@w3.org > November 2009

Re: Validator+HTML5+p+code+pre

From: Dag-Erling Smørgrav <des@des.no>
Date: Sun, 01 Nov 2009 18:14:20 +0100
To: Tomek Osiowy <tomkox@tomkox.net>
Cc: www-validator@w3.org
Message-ID: <86ljiqjhg3.fsf@ds4.des.no>
Tomek Osiowy <tomkox@tomkox.net> writes:
> Hello, validator says that document is not valid (is red) when checked
> "by URI" option, but if I check source "by direct input" option,
> validator says OK (is green).
>
> Probably something is wrong (for validator) with:
> …
>
>    <p>
>       <code>
>          <pre>
>          …
>          </pre>
>       </code>
>    </p>

The pre element is a flow element, and the p and code elements can only
contain phrasing content, so this snippet is invalid.

I have no idea why the validator accepts your code when you submit it by
direct input.

DES
-- 
Dag-Erling Smørgrav - des@des.no
Received on Sunday, 1 November 2009 17:14:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:38 GMT