HTML DOCTYPE Syntax error

Ryan Rampersad, blogged about this issue stating

The error comes from Firebug. The break on this error isn’t a part of the error but it is in the firebug copy dump....

syntax error [Break on this error] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML…3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

The way I encountered this error was that I forgot to specify a src attribute value for my script tag!

<script type="text/javascript" src=""></script>

Here is the blog post.


In my case, when I received such error, the cause was "un authorised access" to the JS file.

To detect it, use FireBug, [HTML] tab: Try to expand each "script" node. one of these nodes contained the "401.html" page-content instead of the expected JS content.


I suspect that you have a <script> pointing to a URL that returns an HTML document (possibly it should be coming with a 404 response but isn't)

Tags:

Html