views:

188

answers:

3

so i heard that XHTML is not supported by IE and so it is treated as HTML 4.01 any way, but still many people still use it... is that true?

one example is that

<div id="contentForAjax" />

in XHTML, it is self closing, but IE will treat it as not closing, and mess up later layout.

+6  A: 

Serving XHTML with the recommended content type application/xhtml+xml is not supported.

See XHTML - myths and reality for more information on this.

wrumsby
do you mean XHTML with other content type is supported by IE?
動靜能量
You can use the Content Type text/html, but if you do your document will be treated as HTML, not as XHTML.
wrumsby
+2  A: 

Nope, IE does not properly support XHTML. A lot of XHTML is actually served as HTML anyway (i.e., it has a text/html MIME type and is parsed as HTML).

WebKit's Maciej posted a good rundown of XHTML support and how it's commonly parsed on the Surfin' Safari blog.

Chuck
+1  A: 

Yes.

And Googlebot does the same thing.

porneL