Quick Difference between HTML and XHTML
XHTML (Extensible HTML) is the extended form of HTML (HyperText Markup Language) . Which is almost identical to HTML 4.0.1. The main thing which forced the language designers to create XHTML was wrong coding standered that is still being accepted by some browsers but not by all. So the requirement was to create uniform language that should be strictly followed by all browsers. So language designers has made few changes to existing HTML in order to make it XHTML.
Following are some crucial difference in XHTML and HTML
*. XHTML is choosy then HTML. There are some element that must appear in the doc. This mandatory includes HTML,Head,Body.
*. In XHTML every starting tag should have end tag as well. Like <p></p>
*.In XHTML all tags must be written in lowercase . Even attribute should also be in lowercase.
*. MIME type must be declared in HTTP headers as “application/xhtml” in each document.
*. XHTML is case sensitive where as HTML is not follows this pattern strictly.
*. HTML is an application of SGML (Standered Generelized Markup language) where as XHTML is an application of XML (extensible markup langauage)
*. In HTML any attribute can have blank value where as in XHTML if there is any attribute there then there must be a value into it. Also the attributes value should be in single or double quotes.