C
Cyberdog
Hi,
When would you use XHTML for a web site as apposed to HTML, and
why.Thanks
When would you use XHTML for a web site as apposed to HTML, and
why.Thanks
Cyberdog said:When would you use XHTML for a web site as apposed to HTML, and
why.
There may be other reasons in a few cases but as XHTML 1.1 is not
suitable for use on the WWW
altamir said:[snip]
There may be other reasons in a few cases but as XHTML 1.1 is not
suitable for use on the WWW
Why?
Personally speaking I have three reasons that make me use XHTML:
2. I want to piss off MSIE users (as that browser can't cope with
properly served XHTML).
Whitecrest said:Good strategy. Piss off 80% of your customers....
Steve said:XHTML 1.1 (as opposed to 1.0) should be served as
application/xhtml+xml rather than text/html and IE doesn't know what
to do with that content-type. As most of the WWW uses IE that means
that XHTML 1.1 isn't suitable for the WWW.
Strange reasoning, the logic conclusion would be that IE isn't suitable
for the WWW.
Spartanicus said:Strange reasoning, the logic conclusion would be that IE isn't suitable
for the WWW.
Spartanicus said:Strange reasoning, the logic conclusion would be that IE isn't suitable
for the WWW.
Steve said:Personally speaking I have three reasons that make me use XHTML:
1. A client asks for it.
2. I want to piss off MSIE users (as that browser can't cope with
properly served XHTML).
3. I feel like it.
For other people there may be two more reasons:
4. They have some XML that for some reason can not be transformed into
HTML but which can be transformed into XHTML (personally I think this
is bogus).
5. It's psychologically easier for them to switch from ye olde
presentational oriented markup coding to semantic markup if they alse
switch from HTML to XHTML at the same time (this is basically the
Zeldman argument, though his book rather confuses the issue via
hypebole and misdirection).
Really a sub-set of 5 is the fact that with XHTML you can validate
code as stricter than strict in _some_ respects (all closing tags
required, etc.) without the need for a custom DTD. But that's a QA
issue that really should be solved via the appropriate QA tools rather
than via the choice of markup language.
There may be other reasons in a few cases but as XHTML 1.1 is not
suitable for use on the WWW and as XHTML 1.0 offers nothing new over
HTML 4.01 there actually aren't any _technical_ reasons to use one
over the other.
Steve
Of course, one other reason to switch is that HTML is a dead language. There
is no more development being done with HTML - no more RFPs - no more
changes. All new development in Web-based presentation is toward CSS and
XML (remember that XHTML is just an XML-based reformulation of HTML). Steve
is absolutely correct in stating the XHTML 1.0 offers no advantage over
HTML 4.01. It was intentionally designed to be that way to ease transition.
However, as the Web continues to mature, all new development will shift
away from HTML.
George Self said:HTML 4.01 works just fine now. However, I suspect that in a few years it
will be as archaic as HTML 2.0 is today. IMHO like it or not, you may as
well get used to XHTML. It's where the Web is going.
--George
XHTML 1.1 (as opposed to 1.0) should be served as
application/xhtml+xml rather than text/html
IE doesn't know what to do with that content-type. As most of the WWW
uses IE that means that XHTML 1.1 isn't suitable for the WWW.
altamir said:Have you seen American Megatrends site (http://www.ami.com)? It's very well
designed and valid XHTML 1.1. Pages are served as text/html.
Have you seen American Megatrends site (http://www.ami.com)? It's very well
designed and valid XHTML 1.1. Pages are served as text/html.
AMI example show that maybe XHTML 1.1 *is suitable* for the WWW.
XHTML 1.1 pages *must not* be served as text/html, they may be served asaltamir said:Have you seen American Megatrends site (http://www.ami.com)? It's very well
designed and valid XHTML 1.1. Pages are served as text/html.
The AMI pages includes among other things this:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
The last attribute indicates the natural language used in the content
of the page: english. MSIE doesn't have a clue what 'xml:lang="en"'
means, and will certainly ignore it. The same goes for many other user
browsers, and probably also for most search robots.
In HTML 4.01 and in XHTML 1.0 we can, and should, write 'lang="en"'
(in XHTML 1.0 we should also write 'xml:lang="en"'). That will be
understood by many or even most user agents, and by many search
robots.
It may have been in the past, but w3's validator is throwing 23
errors this morning.
Bertilo Wennergren
You can still use <meta http-equiv="content-language" content="en" /> which
is well understood.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.