Is the HTML5 DOCTYPE the last one we will see?

我的梦境 提交于 2020-01-14 02:33:38

问题


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

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?


回答1:


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

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)

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




回答2:


This question is probably quite subjective (no, I'm not voting for close). I think the W3C guys are quite optimistic (idealistic) about browser implementation of their standards, and so in that view we shouldn't need more doctypes. Any future HTML versions (in 2030ish?) will just add to the current one to allow for new technologies (because after all, it's perfect!) and so browsers will just need to implement the new features.

How it actually happens, I think we'll just have to wait and see. I predict that in some way, they will regret the terseness of <!doctype html>, although for what reasons I can't be sure.




回答3:


I think that the "doctype html" will be enough.

http://blog.whatwg.org/html-is-the-new-html5

No more HTML4, HTML5 or HTML6... just HTML. They are moving from versioned to unversioned development model. Just a standard that is continuously evolving. So from now on, we should not ask whether my browser supports HTML5 or HTML6, but which are the features supported by my current browser.

Regarding to follow the standards, I think that the developer will be no more the only one to worry about this. Actually there is no browser with a market share big enough to impose its owns, (and even internet explorer its taking very seriously to implement the standards now)



来源:https://stackoverflow.com/questions/4970013/is-the-html5-doctype-the-last-one-we-will-see

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!