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

Re: Validator error messages

From: Etienne Miret <etienne.miret@ens-lyon.org>
Date: Tue, 20 Sep 2011 20:17:14 +0200
Cc: www-validator@w3.org
Message-Id: <ECB35CDB-6D19-421B-8BB1-E3136F3A1849@ens-lyon.org>
To: "Jukka K. Korpela" <jkorpela@cs.tut.fi>, msanderz@att.net
Sorry Jukka, but I think you’re wrong. The error you thought about triggers the error message: “end tag for element "P" which is not open”.

msanderz, I think your issue is that you use XHTML but serve it as text/html. You should avoid doing so, for many reasons, one of them is that it’s very difficult to have inline Javascript in that case. One solution is to put your javascript in a separate file, another one is to switch to HTML, and a third one is to serve your XHTML as application/xhmtl+xml (and replace left and right arrows with “&lt;” and “&lt;”). In the latter case, IE8 and below won’t be able to display your site, but other navigators (including IE9) will properly treat the text “What is new?” as a paragraph.

Note that if you decide to switch to HTML, you will face Jukka’s issue.

I recommend putting your Javascript in a separate file.

Le 20 sept. 2011 à 01:14, msanderz a écrit :
> HTML code:
>    var linkNew = new splash("splash_new", "images/splash_new.gif",
>      "openPage('whatsnew.html')", 
>     "<p>What is new?</p>", "whatsnew.html" );

By the way, that’s Javascript, not HTML.

Regards,

-- 
Etienne Miret
Received on Tuesday, 20 September 2011 18:17:49 UTC

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