XHTML 1.0 is nothing but a reformulation of HTML 4.01 as an application of XML 1.0.
See the
XHTML vs HTML FAQ for more details.
HTML, usually. Microsoft Internet Explorer doesn't support XHTML, which makes XHTML rather unusable for public sites.
Note that many (probably a majority by now)
believe that they use XHTML, but they don't. Merely writing XHTML-style markup doesn't make it XHTML, as explained in the aforementioned FAQ.
The recommended markup language is HTML 4.01 Strict (not XHTML, as gumape claims).
The Transitional DTD allows the use of a number of element types and attributes that are deprecated in the Strict DTD. Those are mainly presentational and should be handled via CSS, or affect behaviour and should be done with JavaScript.
XHTML 1.0 Transitional is a curious abomination whose
raison d'être eludes me.
The first line is the document type declaration, which tells interested parties to which document type definition (DTD) the document claims conformance. Browsers normally don't care, since they use non-validating parsers. Nowadays they do look at the doctype declaration, but only to decide whether it's a reasonably 'modern' or 'old-school' document, which affects the rendering mode.
The doctype declaration is mainly meant for markup validators.
The second line is the start tag for the root element of the document. It must always be
<html> in HTML and XHTML (although HTML is not case-sensitive). The
xmlns attribute is for XHTML only and tells the user agent that this is an XHTML document, as opposed to any other flavour of XML. One might think that the doctype declaration does that, but that's not the case. The doctype declaration is optional; the
xmlns attribute is required for XHTML and must have the exact value you quoted.
Bookmarks