Xhtml 1 or html 5

After finally reaching the stage where I have accumalted enough programming knowledge ( hopefully :confused: ) to re-design my site using CSS3, I am left with only 1 challenge: Xhtml 1 or html 5.
From all I have read, I think I understand that xhtml gives better options to optimise for Android/Iphone/small screen platforms, but can have some compatibility problems for various browsers/systems.

Is there a concrete downside to using Xhtml? If so, what is it?

No, there isnā€™t. HTML5 is not really ready for use, either, as itā€™s still in development, so best to stick with what works for now. (Mind you, thereā€™s not much advantage using XHTML over HTML4, but itā€™s up to you.)

By the way, CSS3 is also in development, and the few bits of it that are supported now donā€™t work in older browsers, so use it wisely and with caution.

Just donā€™t bother with XHTML, it is dead in the water. Has been for the longest time.

XHTML2 is dead in the water, but not XHTML, which is perfectly fine to use and will presumably be usable for many years to come. These days, even the latest version of IE upports it (wow!), but itā€™s worth noting that it was never supported by IE8 and under, meaning that it has to be served as text/html, which means you might as well have used HTML4 all along.

Thanks Ralph,

As there is no ā€œrealā€ (if there is such a thing as real) downside, Iā€™ll take the plunge and use Xhtml as the platform. I may not really use the difference, but if I do find something useful that is specifically ā€œXā€, it will save me redoing the site again. This is the second time I have to do a complete overhaul, and I am getting fed up with patching up.

I know CSS3 is not ā€œfinishedā€, but at the speed things are developing in the web world, I doubt any platform will ever be finished and stay unchanged for more than a year.
With regards to this, I am mainly concerned with avoiding application of coding that creates display incompatibility problems between brosers like [text decoration - blink] not being recognised by IE because people may find it irritating. (No, the irony of MS taking action to avoid people getting irritated, is not lost on me)

Things seem to last longer than that on the web. Anyhow, I guess the point is to use only what you really need, as you can do pretty much anything you need to with HTML4 and CSS2.

That is good to know. As you know, I am far from being able to call myself an expert ( at least without lying ) and I often get the feeling things change faster than I can learn the laterst updates.
I fully agree with your remark to only use what you need. I subsribe to the theory that ā€œless is moreā€ and aim to keep my site as simple as possible without looking cheap/simplistic. Apart from the actual amount of useful information given, I try to keep it as small as possible. My basic premise being that the less code there is, the lower the chance of faults/problems/poor rendering.

Many of us use HTML5 semantics today. I use HTML5 semantics. Itā€™s viable, with the same notable exception as with XHTML: legacy IE. Iā€™d go as far as to say XHTML is worse about that.

The thing is, all of us will use HTML5 semantics tomorrow.

Even more, HTML5 semantics gives you the opportunity to keep coding XHTML or just plain old HTML. Itā€™s your choice.

But XHTML is an application of XML. And XML is long dead now.

I donā€™t know where you got that idea from, but XML is far from being any where near dead.

XML may be kept on life support for now because of the compatibility issues.

But everybody agrees XML is too verbose and itā€™s on its way out.

Who is everybody? Where is this group of everybody you speak of? Iā€™m going to assume you mis-understand what XML is because like I said. It is far from dead, not on life support and there are no compatibility issues keeping it alive. XML is quite alive on its own.

[QUOTE=itmitică;5164725]XML may be kept on life support for now because of the compatibility issues.
[/QUOTE]
In your previous post, you said it was dead; now you say it is not.
Which one is it? Dead or not?
And who are these ā€œeverybodyā€ that know this?

Nitpicking are weā€¦

XML, as technology, is quite dead.

XML, as use, has a few breaths left. Mostly for backward compatibility in app settings, manifests. Just because some few stubborn cling on it in their newest release, doesnā€™t make XML livelier.

Uh huhā€¦so YOU say.

OK. :slight_smile:

For ME, at least, XML is dead. As in no longer a prospect. No longer relevant.

In database world, I donā€™t want data that can break with a little missing >. In HTML world I donā€™t markup that can break with a little missing >. In app settings world, I donā€™t want settings that can break with a little missing >.

Itā€™s not that Iā€™m not for strict and rigorous, I am. But for substance, not for structure. Much less for a superfluous verbose structure.

I agree with this. Even pages that claim to be XHTML are nonetheless served as text/html, which means as far as the browser is concerned, itā€™s just plain old HTML, which means thereā€™s zero benefit.

Downsides

  1. You should use the XHTML syntax only if youā€™re using the XHTML features too, otherwise it just shows a poor understanding of what XHTML stands for

  2. Youā€™re just presenting the browser with a wrong syntax each and every time it receives your page, which means extra work for it and it opens the door to potentially odd and buggy behavior from its part

And this is true for HTML5 semantics also. Even though the DTD is common for both features, you should choose one and stick with it, you shouldnā€™t create hybrids. Clarity on intent, consistency on code.

From what I understand so far reading through loads of browser discussions, most browsers contain up to 50% ā€œerror-patch-codingā€ to be able to read sloppy coding. As smart phones are grabbing the web market by storm, it is well advisable to make sure your code is spot on, as phone software is more limited than computer software and thus more prone to display problems.
Writing clean code is really not that big a chore as long as you pay attention and test it. I handwrite it using wordpad and Notepad++, which makes it easy to spot typos. After that, I run it through a validator on ā€œstrictā€, which will pick up the remaining bit of static.
To chose a system because it allows for sloppy coding, is a strange way to go about imho.

As you stated yourself, a code is only as sloppy (or as clean) as you ā€¦ code it. It has nothing to do with a system.

Iā€™m not sure how you handwrite code in Wordpad though. For hand-coding HTML, you need a plain text editor, which Wordpad is not.

And HTML has a strict DTD too, not just XHTML.

Finally, you should use XHTML only if you really use it, not as a catching net for coding errors. Thatā€™s wrong. And strange. And it has the reverse effect on the browser, since you obviously wonā€™t be serving it as application/xhtml+xml or application/xml.

I donā€™t think anyone here suggested HTML ā€œbecause it allows for sloppy coding.ā€ We suggested HTML because, even if you use an XHTML doctype and the self-closing slashes, browsers are nonetheless parsing your code as if it were plain HTML. The XHTML is just a facade.