I didn’t realize this until just recently, but there actually seems to be a raging debate in the web developer community about whether HTML should be taught before xHTML, or whether beginners should start off with xHTML from the beginning.
Why is this even a question to anyone? Isn’t the answer a no-brainer?
At “Lachy’s Log,” there is an article titled, “XHTML is not for beginners.” In it, the author goes through a lot of technical explanation as to why beginners should learn HTML before xHTML because of HTML’s leniency.
Well, I disagree. It is because of this leniency in HTML that makes it so difficult for many people to learn xHTML, because they have already picked up a lot of bad habits through the use of HTML. For this reason, I believe in learning things right the first time, which means bypassing HTML and heading straight for the xHTML.
Besides, xHTML isn’t any harder to learn than HTML, in my opinion. It just follows slightly different rules. Granted, it’s less lenient if you break those rules, but with tools like the w3c Validator, it’s easy enough to find and correct any errors there may be in your code.
As for the encoding issues Lachy points out, I haven’t noticed any problems on the 8 different browsers I’ve checked my own sites on, or several other websites that use xHTML.
Lachy specifically states that serving up xHTML as text/html is harmful on IE7 and lower, but that’s exactly what CSS Zen Garden does, and the layouts on that website look just as beautiful on IE7 as they do on Firefox.
This isn’t to pick on Lachy. Lachy seems very intelligent and there are many others out there who agree with Lachy, otherwise there wouldn’t be a debate. But I see no reason to agree with them, as all the evidence I’ve seen seems to point in the opposite direction.