Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我打算使用 HTML5 DOCTYPE。但我可能会使用一些 HTML4 或 XHTML 标记。使用 HTML5 DOCTYPE 是否有效?网页不会进入怪癖模式吗?
提前致谢
使用 HTML5 DOCTYPE 是否有效?
可以编写(除了 Doctype)有效的 HTML 4 和有效的 HTML 5 的文档。也可以编写不是的文档。所以“这取决于”。
网页不会进入怪癖模式吗?
浏览器呈现模式不是由 Doctype 之后的任何东西决定的(IE 特定的元标记除外)。