IE的XHTML兼容性

编程入门 行业动态 更新时间:2024-10-28 16:18:47
本文介绍了IE的XHTML兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 对于IE的XHTML兼容性我有一个激烈的争论。唯一的问题是,我不确定那个人是不是在拖钓。从本质上讲,他声称IE绝对不存在XHTML兼容性,并且具有定义的XHTML文档类型的文档在作为内容类型text / html时完全没有意义,而不考虑浏览器使用。

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

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

你可以在 digitalpoint论坛。

解决方案

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

更多详情: 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: hsivonen.iki.fi/doctype/

更多推荐

IE的XHTML兼容性

本文发布于:2023-11-03 09:13:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1554782.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:兼容性   XHTML

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!