本文介绍了IE的XHTML兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于IE的XHTML兼容性我有一个激烈的争论。唯一的问题是,我不确定那个人是不是在拖钓。从本质上讲,他声称IE绝对不存在XHTML兼容性,并且具有定义的XHTML文档类型的文档在作为内容类型text / html时完全没有意义,而不考虑浏览器使用。



我不相信这个和其他来源说的,但我错了吗?

编辑:不考虑IE,它是否仍然意味着当XHTML在HTML文档中定义时,它不是XHTML?喜欢那个人建议的?我目前的理解是,XHTML通常包含在HTML内容类型中。这意味着技术上你可以说XHTML只是HTML,除非使用正确的内容类型。但它仍然是XHTML语法,所以它有点令人困惑。



你可以在。

解决方案

IE确实不支持 application / xhtml + xml 内容类型,而其他浏览器则将HTML处理为XML。当使用 text / html 时,每个浏览器都会将XHTML作为HTML来处理,而IE在这里不会有任何不同之处(从通常的怪癖中可以预料到)。



更多详情: http://hsivonen.iki.fi/doctype/


I'm having a rather heated debate into IE's XHTML Compatibility. The only thing is, I'm unsure if the guy is trolling.

Essentially he claims that IE has absolutely no XHTML compatibility, and that a document with a defined XHTML doctype means absolutely nothing when served as content type text/html, regardless of the browser used.

I do not believe this and sources say otherwise, but I am wrong?

Edit: Disregarding IE, does it still mean that when XHTML is defined in an HTML document it is NOT XHTML? Like the guy suggested? My current understanding is that XHTML is often contained within the HTML content type. This means that technically you could say that XHTML is merely HTML unless the correct content-type is used. But it's still XHTML syntax and so it a little confusing.

You can find the thread in question over at digitalpoint forums.

解决方案

IE has indeed no support for application/xhtml+xml content type while other browsers would then handle HTML as XML. When text/html is used, every browser will just handle XHTML as HTML, IE does nothing different here (expect from the usual quirks).

More details here: http://hsivonen.iki.fi/doctype/

这篇关于IE的XHTML兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 15:00
查看更多