ARCHIVE / What are the differences between HTML and XHTML?
Because XHTML 1 was designed to essentially rewrite HTML 4 as XML, the differences between HTML and XHTML have to do mostly with syntax. For example, the ubiquitous break or new-line tag in HTML is written <br> whereas in XHTML it is written <br/>. In conforming XHTML, a document type reference must be provided at the beginning of the file, a root tag of html must have an xmlns declaration, all tags must be closed, all tag attributes must have quoted values, tags may be nested but not overlapped and, lastly, all HTML tags and attributes are in lower case. Beyond these restrictions, there are very few syntactic differences and no semantic differences.
last updated 2007.09.24