Right now, I am using XHTML 1.0 Strict but I have no idea which to keep an eye
on. Pros and cons? New tags, deprecated tags, complaints?
XHTML2 is more document centric whereas HTML5 (which comes in an XHTML
flavour) is more application centric.
It is likely to be a long time before both of these new formats are in
general use and fully supported by most popular browsers. There likely
is no compelling reason to switch to either of the new formats soon.
After all, the W3C validator and most browsers still support html 3.2.
And IE browsers through IE7 can not even support any type of xhtml
served properly as application/xhtml+xml after all of these years
since xhtml first appeared - you have to resort to tricks and smoke
and mirrors to get IE to support xhtml code served properly but true
xhtml is understood by nearly all other recent popular browsers.Thus
you likely can wait until we know much more about the new formats
unless you just want to be among the first to use a new format.
Converting old pages to the new formats likely will not be needed for
a very long time, if ever.
> Right now, I am using XHTML 1.0 Strict but I have no idea which to keep an eye
> on. Pros and cons? New tags, deprecated tags, complaints?
How are you handling IE browsers if you use xhtml 1.0 strict? If you
serve as the usual mime text/html for html pages, you are not using
true xhtml which requires a mime of application/xhtml+xml. This then
makes the browser parse the page as xml which is extremely strict, and
you often get an error message rather than a view of the page if there
is a single xml error, such as some tag not being closed. And IE
through 7 can not view the page. You have to do a trick such as use
header exchange and server side code such as php to rewrite the page
as say html 4.01 strict to get the page to work for IE. If you do not
set the correct mime type for xhtml on the server and just use the
mime type for html, the xhtml page will usually work, but it is just
html, not xhtml, is not properly parsed as xml etc. In such a case
writing the code in xhtml has no advantages and you would be better
off using html 4.01 strict in the first place. I would guess more than
99% of xhtml pages are not served properly. It takes two things to
have xhtml. 1. The valid xhtml code of course must be used. 2. the
server must be set to serve the xhtml page as application/xhtml+xml
mime type and not html page text/html mime type usually used for an
html page.
HTML 4.01 Strict for the very long-term forseeable future.
_Ten_whole_years_ after HTML 4, we're just about in a state where we
can use it without problems. We're still nowhere near being able to
use XHTML 1.0 as it's meant to be.
HTML 5 is a bunch of crazy egotists breaking stuff to no benefit. Best
ignored. It certainly doesn't help much today, or for any strand of
browser development currently visible.
To be honest I don't think it matters right now, so long as you write
valid markup that works in all the common browsers.
We tend to code for XHTML1.0 transitional; it's easy to fix for older
browser, but has some of the XHTML rules that make the code easier to
debug. But there's no strong argument for this over strict HTML4.
Users don't care; they just want the site they are visiting to work.