无法确定解析模式无法修复

时间:2015-01-21 11:19:21

标签: html doctype

我无法解决该错误:

Unable to Determine Parse Mode!

The validator can process documents either as XML (for document types such as XHTML, SVG, etc.) or SGML (for HTML 4.01 and prior versions). For this document, the information available was not sufficient to determine the parsing mode unambiguously, because:

    the MIME Media Type (text/html) can be used for XML or SGML document types
    No known Document Type could be detected
    No XML declaration (e.g <?xml version="1.0"?>) could be found at the beginning of the document.
    No XML namespace (e.g <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">) could be found at the root of the document.

As a default, the validator is falling back to SGML mode.

现在我用这个:

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

我读了一些答案说改变了这个:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

或者这个:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> 

我还将文件保存为UTF-8,但它没有检测到doctype

我不明白为什么。

这里链接到我的网站,我使用Laravel 4。

http://test.ibids.co.il/?lang=en

我使用http://validator.w3.org进行检查。

感谢。

1 个答案:

答案 0 :(得分:3)

您需要在页面顶部声明您的doctype。查看您的页面源代码,您可以在其之前编写样式表和样式标记的链接。这些内容应出现在文档的head部分