HTML DOCTYPE 标签
First, the only trigger for a browser to parse in standards mode is a DOCTYPE as the first line of an HTML or XHTML document, as Listing 1 shows.
首先,让浏览器用标准模式解析的惟一条件是HTML或XHTML文档的第一行包含DOCTYPE,如清单1所示。
While the DOCTYPE declaration informs a browser to use standards mode, it will still parse the HTML according to the rules in that DTD — in this case, HTML 4.0.
虽然DOCTYPE声明告诉浏览器使用标准模式,但是它仍然会根据那个DTD——即HTML 4.0的规则去解析html。
So if you've got a doctype that claims XHTML 1.0 strict, and your page really is HTML 4.01 transitional, the Validator will tell you that.
所以如果您已经获得声称是XHTML 1.0严格版的doctype,而此页面实际上是HTML 4.01过渡版,Validator将会告诉您这些。
应用推荐