Why does Firebug return an error in my doctype?
为什么Firebug在我的doctype中返回错误?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
error
syntax error
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
source code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
.....
2 个解决方案
#1
82
This usually happens because you are loading an HTML document as a script. This is often caused by <script src=""></script>
(i.e. a relative URI pointing at the current, HTML, document)) or one of the scripts pointing to a 404 error.
这通常是因为您将HTML文档作为脚本加载。这通常是由
#2
0
DOCTYPE normally is expressed on one line like below. and can cause syntax error
DOCTYPE通常表示在如下所示的一行上。并可能导致语法错误
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
But even sometimes it will yell about a syntax error when a src attribute is not declared for an element. Firebug can also through this error when a source is not found or is called twice on one page. EX: script/image/link.
但即使有时,当没有为元素声明src属性时,它会对语法错误大喊大叫。当找不到源或在一个页面上调用两次时,Firebug也可以通过此错误。 EX:脚本/图像/链接。
#1
82
This usually happens because you are loading an HTML document as a script. This is often caused by <script src=""></script>
(i.e. a relative URI pointing at the current, HTML, document)) or one of the scripts pointing to a 404 error.
这通常是因为您将HTML文档作为脚本加载。这通常是由
#2
0
DOCTYPE normally is expressed on one line like below. and can cause syntax error
DOCTYPE通常表示在如下所示的一行上。并可能导致语法错误
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
But even sometimes it will yell about a syntax error when a src attribute is not declared for an element. Firebug can also through this error when a source is not found or is called twice on one page. EX: script/image/link.
但即使有时,当没有为元素声明src属性时,它会对语法错误大喊大叫。当找不到源或在一个页面上调用两次时,Firebug也可以通过此错误。 EX:脚本/图像/链接。