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

Re: Can't figure this error out

From: Michael(tm) Smith <mike@w3.org>
Date: Fri, 19 Mar 2010 03:54:05 +0900
To: Lou King <lking@knob.com>
Cc: www-validator Community <www-validator@w3.org>
Message-ID: <20100318185405.GA3146@sideshowbarker>
Lou King <lking@knob.com>, 2010-03-18 14:30 -0400:

> http://www.knob.com/ATG/Calendar/venture.html
> 
> map.openInfoWindowHtml(map.getCenter(), "<img
> src='../jpg/Finian.jpg' width='64' height='80' alt='picture of
> Peter'><b>This is a picture of 951 Greene Street</b>");
> 
> As written the code works with all browsers I checked. The Goole
> Maps function openWindowHtml() gets 2 values; a point on the map and
> a string of HTML code which is the content of the balloon created.
> 
> The problem is that I can't figure out how to get the line to
> validate. The error is "end tag for element "B" which is not open"
> pointing at the last ">". If I change the closing tag to "/>" then
> it validates but what is displayed is "... Street/>". If I change it
> to "</" it still works but doesn't validate.

While that line is invalid with regard to the HTML4 spec, it's not
an error condition as far a processing in browsers is concerned
(as you note, it works as expected in all browsers you checked).
And it's intentionally not invalid in HTML5. So if you change your
doctype to <!doctype html> (to trigger validation against HTML5
instead of HTML4) and re-check your page, I think you should find
that it validates.

  --Mike

-- 
Michael(tm) Smith
http://people.w3.org/mike
Received on Thursday, 18 March 2010 18:54:08 GMT

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