mattds, on 04 February 2012 - 11:22 PM, said:
XHTML is pretty much the same as HTML but is more strict and less forgiving. Which is a good thing if you want to create standards compliant websites. Learn it and then work with it to become familiar with the language.
Remember that XHTML 1.0 coded with content="text/html" in the meta tag (which is what many people do, including this forum) IS NOT XHTML, it's actually processed as HTML but you have to use the coding method for XHTML like lower case style names and closing open tags with /> instead of just > and it's called tag soup because it's a mixture of HTML and XHTML.
Pure XHTML has to have a meta tag with content="application/xhtml+xml" instead of content="text/html" and is so strict that the smallest mistake will result in the page not displaying (only an error message) and IE6 won't process it at all. This page item 1.6
http://dev.w3.org/ht...l#html-vs-xhtml
says
The first such concrete syntax is the HTML syntax. This is the format suggested for most authors. It is compatible with most legacy Web browsers.
HTML 4.01 is still the official standard (HTML5 is still in draft but may be used).
HTML and (pure) XHTML diverged a few years ago and are continuing in different directions. Pure XHTML written properly with content="application/xhtml+xml" is intended for specialist applications like XML based languages SVG and MathML and inappropriate for normal websites.
Many people are still using XHTML 1.0 coded with content="text/html" because it seems neater to use lower case everywhere and close all tags. HTML in fact allows a <p> tag without its closing </p> tag and also unclosed <img src="" alt=""> tags. HTML5 doesn't seem to mind if you leave tags unclosed or close them. I think most developers are using HTML5 more and more now, even if some of the features and new elements have to be avoided or dealt with differently because older browsers don't process all the new elements and CSS3 features.
This post has been edited by Wickham: 05 February 2012 - 07:14 AM