- From: Lou King <lking@knob.com>
- Date: Fri, 19 Mar 2010 12:02:57 -0400
- To: www-validator Community <www-validator@w3.org>
Michael(tm) Smith wrote, On 3/18/2010 2:54 PM: > Lou King<lking@knob.com>, 2010-03-18 14:30 -0400: > >> 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 > An alternative solution I like better is to separate the offending JavaScript from the HTML. The HTML4 file then validates, the foo.js JavaScript file is valid and the maybe, maybe not implementation of HTML5 is avoided. Thanks for your input Mike. It made me think "outside the file." ;) Lou -- O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
Received on Friday, 19 March 2010 16:04:06 UTC