Hi,
I can fully admit I wrote pages in XHTML in a vain effort to be bleeding edge. I must
say that, having read Stuart Langridge's "DHTML UTopia" and its convincing
argument about using HTML 4.01, I am coming round to the idea that there are currently no
genuine advantages to using XHTML. I shall explain.
If I were to write a webpage in XHTML of any flavour but also made the effort
to serve it with the correct MIME-type to browsers which support it, that would
work fine, but the benefits would be debatable. If I had javascripts within
those pages and the pages were served as XML, some methods that work when they
are served as plain old HTML would not work in an XML document.
So, for the gain of nil benefits, I would lose some compatibility. Not a fair
trade. Until you can assuredly say that all browsers will accept the same
standards, serving documents as XML is a nice idea but currently unfeasible.
HTML 4.01 will always be a standard and, as such, any pages written to that
standard will always work.
No doubt many better-informed people will shoot me down, but that's just the
way I see it at the moment.
Cheers,
Iain
Roberto Gorjão wrote:
Olá a todos,
I’ve tried to make my mind on my own on this subject, but I must confess
I’m a bit confused…
I’m talking about XHTML 1.0 served as text/html, as I have no use for
xml yet… Should I prefer it to HTML 4.01? Why?
On one hand I have the recommendations of:
* The W3C – In their note “XHTML Media Types”(
http://www.w3.org/TR/xhtml-media-types/), they say: “In summary,
'application/xhtml+xml' *SHOULD* be used for XHTML Family
documents, and the use of 'text/html' *SHOULD* be limited to
HTML-compatible XHTML 1.0 documents.” – which doesn’t configure a
recommendation for using XHTML in place of HTML, as Mark Pilgrim
stresses.
* Richard Ishida in his enlightening W3C tutorial: “We recommend the
use of XHTML wherever possible”
(http://www.w3.org/International/tutorials/tutorial-char-enc/en/all.html#Slide0010)
* Jeffrey Zeldman in his book / almost bible “Designing with web
standards”: “Top 10 reasons to Convert to XHTML”; “1- XHMTL is the
current markup standard, replacing HTML 4.”; “3- XHTML is more
consistent than HTML (…)”; “6- New browsers love XHTML (…)”; etc…
“Top 5 reasons not to switch to XHMTL”; “1- you get paid by the
hour.”, etc…
* most of you that, by your practice and the URLs you have posted,
have shown to prefer XHTML (are you serving it as XML too / using
any kind of content negotiation? Am I missing something?)
On the other hand I have:
* The Web Standards Project – in its article “WaSP asks the W3C”
(http://www.webstandards.org/learn/askw3c/sep2003.html) they
explicitly recommend serving HTML as text/html and XHTML as
application/xhtml+xml, unless using some kind of content
negotiation by the server. Text/html is considered an “alternate
mime type” for XHTML 1.0., but is not explicitly recommended even
if we follow the backward compatibility guidelines (appendix C of
XHTML 1.0 W3C recommendation).
* Ian Hickson text “Sending XHTML as text/html considered harmful”
(http://www.hixie.ch/advocacy/xhtml), where he specifically
defends that “RFC 2854 spec refers to "a profile of use of XHTML
which is compatible with HTML 4.01". There is no such thing.
Documents that follow the guidelines in appendix C are not valid
HTML 4.01 documents.”
* Mark Pilgrims’ article “The Road to XHTML 2.0: MIME Types”
(http://www.xml.com/pub/a/2003/03/19/dive-into-xml.html). He talks
about “XHTML's Dirty Little Secret” and says that “browsers aren't
actually treating your XHTML as XML. Your validated, correctly
DOCTYPE'd, completely standards compliant XHTML markup is being
treated as if it were still HTML with a few weird slashes in
places they don't belong”…
* The new book “DHTML Utopia: Modern Web Design using JavaScript &
DOM”, where Stuart Langridge echoes the opinions of Pilgrim and
Hickson, strongly defending the use of HTML 4.0.1: “In short,
using XHTML right now provides very little in the way of benefits,
but brings with it a fair few extra complications. HTML 4.01
Strict is just as “valid” as XHTML—XHTML did not replace HTML but
sits alongside it.”
So, what are your opinions? Can someone shed some light on this subject?
Where does the Web Standards Group stand about it, if at all? And the
JavaScript developers among you… do you have any bad experiences to tell
about the use of XHTML 1.0 in place of HTML 4.01 strict?
Bom fim de semana!
Roberto
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************