本文介绍了HTML5 DOCTYPE是我们将要看到的最后一个吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简洁的HTML5文档类型<!DOCTYPE HTML> 似乎表明这是我们将看到的最后一个HTML文档类型。

The rather terse HTML5 doctype, <!DOCTYPE HTML>, seems to indicate that this the last HTML doctype we will see. Is this really true?

据我了解,各种文档类型的主要功能是打开现代浏览器的众多怪异渲染模式。当然,没有什么可以阻止这种情况再次发生吗?例如,人们针对中断的浏览器实现编写网页,导致将来的浏览器需要采用doctype嗅探?

From what I understand the primary function of the various doctypes was to turn on the numerous quirks rendering modes of modern browsers. Surely there is nothing stopping this from happening again? i.e. people writing web=-pages against a 'broken' browser implementation, resulting in future browsers needing to employ doctype sniffing?

推荐答案

新的html标准的想法是它应该向前兼容。

The idea of the new html standard is that it should be forward compatible.

如果新标准到来(html 6?),它们应该在html 5渲染器上正常渲染,只是不具有所有新功能(将来)。

If new standards arrive (html 6?) they should render normally on html 5 renderers, just not have all the new (future) features.

在此处了解更多信息:
(在页面的一半位置)

Read more about it here: http://www.alistapart.com/articles/semanticsinhtml5(somewhere half way the page)

另一个原因简短的文档类型是html5没有DTD。

Another reason for the short doctype is that html5 has no DTD.

这篇关于HTML5 DOCTYPE是我们将要看到的最后一个吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 16:27