<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html
xmlns="
http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
AH.. yes.. XHTML .. the failed idea.
A short history of the web to explain where XHTML came from.
In the early days of the web, even back with the very first web browser,
it was noticed that people made minor mistakes in their HTML. At that
point, the web browser makers made a bad call... they decided to fix bad
web pages, rather than rejecting them.
So, years later, and the techs all realized this was a bad call, but
there was a lot of stuff already in existence that would never be
updated... but they wanted a 'fresh slate' to start from ... so they
decided that XHTML would be the fresh start.
XHTML pages -- served as XHTML -- would be required to be well formed and
properly passing validation and all of that.
Great idea.
Trouble is, Microsoft. IE never supported XHTML. Still doesn't. So, in
order to use XHTML, you had to lie -- and in your server headers say that
it was HTML. (The line:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
does the same thing. It "undoes" the XHTML.)
So, now you had this:
XHTML was /not/ compatible with HTML for reasons I won't get into the
history of.
XHTML was being served as HTML.
Browsers saw XHTML as badly formed HTML and thus ...
.... you continued the very problem you were trying to avoid.
XHTML was an experiment that failed. With a very few edges cases in some
rare circumstances, it offered no real advantage over HTML. It was
mutated into HTML ...
The reason its popular? It was a buzzword!
Everybody wanted to be the 'latest and greatest' bandwagon ... the name
got press coverage, so everyone wanted to use it ... but very few people
had any technical reason to do so what-so-ever.
The pages I create using this work fine, but I've seen others say this
version shouldn't be used anymore? I work with alot of code that
interacts with ascx and aspx pages, so a validator will throw an error
even tho the code needs to be there to interact with the server code.
Browsers auto-correct ...unfortunately.
All these different doctypes, although they supposedly have their own
standard.. some are use still and others say don't use them now.
There's alot of arguing that I've seen over this. Can you explain?
There are really only four doctypes that I would say matter.
HTML 4.01 strict. What all new projects should be done with.
HTML 4.01 transitional. IFF you are upgrading an ancient page. But I
prefer to rewrite and go with strict anyways.
XHTML: It shows that someone is either using an improperly configured
tool, or they are just following the bandwagon with no thought as to
why. If the page can be viewed under IE, then despite whatever they are
trying to do --- they aren't using XHTML.
HTML 5: The new emerging standard. I'd not use it except in
"experimenetal" or "cutting edge" projects.