|
Posted by cwdjrxyz on 01/23/06 03:30
John Salerno wrote:
> cwdjrxyz wrote:
>
> > The moral of the story is that to write in XHTML and then just serve it
> > as HTML, as many do is pointless, and you are better off just using
> > HTML 4.01 strict.
> >
>
> Wow, I didn't realize that so many people were actually against using
> XHTML in place of HTML. I would think that since it is the newest
> technology, that it would be desired over HTML. I know it's been around
> for 5 years, which is why it surprises me that browsers still don't
> support it well. Now I'm confused all over again. I thought the decision
> to use XHTML was a no-brainer, but now I'm reading a lot of posts
> (including in this thread!) that seem to suggest XHTML isn't a good
> thing right now...
You are quite right that many are against using XHTML at all. I am not
one of these and now write and serve most new pages as true xhtml 1.1
to browsers that will accept it and as html 4.01 strict to IE6 and
other browsers that do not say they will accept the mime type
application/xhtml+xml in the header exchange. There are a few lesser
used browsers that will not tell you what they can use in the header
exchange. For that case I err on the safe side and serve html 4.01
strict to avoid possible lock out of the browser. Recent Safaris appear
to fall into this group, although they really will accept proper XHTML
- they just do not tell you they will and browser name and version
detection is not very safe in these days when browsers often spoof one
another. I am very much against serving XHTML as application/html as
many are doing, often without being aware of it. This often does no
practical harm, but to do so is just a waste of time because you are
really just using HTML. Also true XHTML is not as forgiving as HTML. If
you view a page on a true XHTML aware browser such as Opera or one of
the Mozilla family, the page is parsed as XML. Even the most small XML
error, such as an unclosed tag, often causes the page not to show and
gives you an XML parse error message instead. We have all seen HTML
pages full of such small errors that still display fairly well, at
least on some browsers.
[Back to original message]
|