This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
When a javascript string is built up with the "+"-sign, the HTML validation will not be done upon the complete string, but on the substrings. For this reason: myHint.innerHTML = "<center><small>" + text + "</small></center>" ; Will result in the following errors like: ------ Line 15, column 68: end tag for element "CENTER" which is not open ... = "<center><small>" + text + "</small></center>" ; ------
The error message you cited also contains: "If this error occured in a script section of your document, you should probably read this FAQ entry." ...where "FAQ entry" is a link to http://validator.w3.org/docs/help.html#faq-javascript