Reply to Re: XHTML vs HTML

Your name:

Reply:


Posted by Nikita the Spider on 07/18/06 22:02

In article <SNavg.111483$I61.7882@clgrps13>,
"Michael Laplante" <nowhereman@twilightzone.net> wrote:

> "Toby Inkster" <usenet200607@tobyinkster.co.uk> wrote in message
> news:b5nvo3-o4p.ln1@ophelia.g5n.co.uk...
> > Michael Laplante wrote:
>
> > The only real difference is that XHTML has to obey XML rules, whereas HTML
> > doesn't. The places it manifests itself are: [etc]
>
> Okay, that seemed easy enough. Why does the issue seem to generate this huge
> amount of controversy? I'm using an xhtml template for a project and am now
> wondering if there are some major issues I should be aware of.

Inkster's right, there aren't huge differences between HTML and XHTML.
In fact, XHTML 1.0's deliberate goal was just a reformulation of HTML
4.01 as XML. However, in the real world one still has to deliver that
XHTML to the client, and therein lies the rub. Documents delivered via
HTTP come with a content type, and that content-type can say that the
document in question is either HTML or XHTML (or a few other things, but
we'll ignore them for the purposes of this discussion).

OK, so far, so good. The problem is that the 10,000 pound gorilla that
is IE6 barfs when it sees an XHTML content type. So as long as IE6 is a
significant player on the browser scene (which will probably be until
about, oh, 2012), Web developers who want to deliver XHTML via HTTP have
three choices:
1) Ignore IE users
2) Use content-negotiation to deliver HTML to IE and XHTML to everything
else.
3) Deliver XHTML as HTML, which amounts to lying about the content type.

#1 is popularity suicide and #2 is more work than most of us are willing
to do, so most opt for #3. Ian Hickson wrote an oft-cited article
discouraging this practice. It is entitled "Sending XHTML as text/html
Considered Harmful":
http://hixie.ch/advocacy/xhtml

Furthermore, Steven Pemberton, chair of the W3C HTML Working Group said
in 2000, "Therefore, documents served as text/html should be treated as
HTML and not as XHTML. There should be no sniffing of text/html
documents to see if they are really XHTML."
http://lists.w3.org/Archives/Public/www-html/2000Sep/0024.html

In other words, the practice might be common, but there's some
well-informed folks that are against it. The discussion as to whether or
not this is really OK is another religious debate that usually riles
people up into a good froth.

Personally, I prefer XHTML for all of its crunchy XML goodness, but I
also prefer to send my code with the correct content type, so all of my
code is HTML 4.01 Strict. Now if you'll excuse me, there some folks at
the door. Hmmmm, I wonder why they've got tar and feathers...?

--
Philip
http://NikitaTheSpider.com/
Whole-site HTML validation, link checking and more

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация