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.
DTD的重要性是什么以及它如何影响网页在运行时的显示
如前所述,这会告诉浏览器您所针对的文档的确切类型(例如 HTML 版本)。特别是某些浏览器具有“怪癖模式”和“严格模式”,它们在运行时都会以不同的方式呈现(显示)您的 HTML。
A List Apart 上有一篇有用的DOCTYPE 文章可帮助您选择正确的 DTD。
DTD 定义了文档的类型,尤其是您打算定位的 HTML 规范的特定版本。