Re: Validator error messages

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 “<” and “<”). 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.


Etienne Miret

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