English 中文(简体)
HTML 5 Doctype causing quirksmode?
原标题:
  • 时间:2009-12-11 07:47:48
  •  标签:
  • html
  • doctype

Does using an HTML 5 Doctype cause Quirks mode in modern browsers, since HTML5 isn t out yet?

(That is Modern Browsers were out before HMTL5 started spreading, so they don t properly support it.)

If yes, does this mean that the HTML 5 Doctype is tentatively like none at all?

EDIT: If not, what does it do in browsers that don t support and the like?

最佳回答

No it doesn t, see this article.

What s nice about this new DOCTYPE, especially, is that all current browsers (IE, FF, Opera, Safari) will look at it and switch the content into standards mode - even though they don t implement HTML5. This means that you could start writing your web pages using HTML5 today and have them last for a very, very, long time.

问题回答

According to Wikipedia table (that I love) HTML 5 DOCTYPE triggers full standard mode for:

FF, Chrome, Opera 7.5+, Safari, Konqeror 3.5+ and also IE8!!!

and triggers Almost standard mode [*] for:

IE6 and IE7

So it s definitely the best DOCTYPE ever created!

"One DOCTYPE to bring them all and in the darkness bind them..." [Lords of the rings]

[*] "Almost standards" does NOT make such a big difference to full standard mode, in the same Wikipedia link above you can find more details.

No it does not.





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签