
Originally Posted by
jscheuer1
Those are errors produced because the validator is trying to validate javascript code as HTML code.
No, it isn't. If it did, it would complain about:
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<title//<body<script type="text/javascript">
<p id=">
</>
but it's perfectly valid. All that the validator is trying to do is find the end of the script element so it looks for anything that matches an end-tag production.
It is the validator that is in error.
You should know better than to write things like that.
The actual code is valid.
No, it wasn't. Among the minimisation features of SGML (some of which are enabled in HTML) are unclosed end-tags. These are like normal end-tags except the TAGC (>) is omitted. However, an unclosed end-tag must be followed by a STAGO (<) or ETAGO (</). Instead, it was followed by a comma.
Mike
Bookmarks