If you have more questions to ask, or you know of more differences, feel free to edit. What is the difference between XHTML and HTML? Isn't XHTML merely a more strict version of HTML? And why are there different versions of XHTML if they all act the same?
XHTML solves the above problems: adopt XML to provide extensible tags. provide a 'strict' standard for web browsers XHTML has well defined rules about the structure and these can be programatically enforced. Check the various online "XHTML Validators". They will tell if your XHTML is well formed or not (and highlight the problem areas).
XHTML 2, currently in the drafting stages, is not backwards-compatible with XHTML 1.x. XHTML 2 will have lots of major changes to the way documents are written and structured, and even if you already have your site written in XHTML 1.1, a complete site rewrite will usually be necessary in order to convert it to proper XHTML 2.
XHTML is based on XML, and thus requires the source to be well-formed. Since XHTML is more strict than HTML, less pre-processing is needed by the rendering engine.
The XHTML 1.0 and 1.1 specifications are both in use. Essentially, they use the same language as HTML 4.01 but use a different serialization, one that is compatible with the XML 1.0 specification. i.e. XHTML is an XML application. The HTML5 (as of 2010-04-18, draft) specification describes a new language for both HTML and XHTML.
XHTML 1.0 is an SGML defined form of the HTML language with some extended requirements to gleam progressive compatibility towards XML syntax. XHTML 1.1 is the HTML language defined in XML with XML well-formedness requirements. HTML5, like HTML 1.0, is not defined using any meta language.
The root element of an XHTML document must be html, and must contain an xmlns attribute to associate it with the XHTML namespace. You see, it's important to understand that XHTML isn't HTML but XML - a very different creature. (ok, a kind of different creature) The xmlns attribute is just one of those things the document needs to be valid XML. Why?
As the title describes, what are the different doctypes available and what do they mean? I notice that the layout looks a little different in IE7 when I switch from <!DOCTYPE HTML PUBLIC "-//W...
Encoding quotation marks (") is in practice only needed if the're inside an attribute, however for the HTML code to be correct (passing HTML validation), you should always encode quotation marks as ". Apostrophes (') don't need escaping in HTML. In XHTML they should be encoded as '.
Writing HTML compatible XHTML is more work than writing HTML or XHTML, and doesn't let you use any of the interesting bits of XHTML. Converting from text/html to application/xhtml+xml is difficult because it's not HTML Converting from HTML to XHTML is actually pretty trivial. Tidy can do it for lots of documents (including all valid HTML ...