文档怪异模式和标准模式

Tags
html
Created
Nov 20, 2018 8:09 AM

document.compatMode

https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode

怪异模式下,排版会模拟 Navigator 4 与 Internet Explorer 5 的非标准行为

任何放在 DOCTYPE 前面的东西,比如批注或 XML 声明,会令 Internet Explorer 9 或更早期的浏览器触发怪异模式。

在 HTML5中,<!DOCTYPE html> 唯一的作用是启用标准模式。

XHTML 并在 Content-Type HTTP 标头使用 application/xhtml+xml MIME 类型,你不需要使用 DOCTYPE 启动标准模式,因为这种文件会永远使用标准模式.(IE9+)

SuperMade with Super