XHTML vs. HTML
Right now, the "web" is filled with poorly-formed documents. That is, websites that do not conform to the HTML 4.01 standard. Believe it or not, there are specific rules for coding in HTML. XHTML is a combination of XML and HTML. XHTML, when properly formed, is compatible with every XML reader (that conforms to the XML standard). Rather than separating web browsers and XML browsers, they can be combined.
Most browsers now-a-days (Firefox and Internet Explorer included) are very forgiving when it comes to poorly-formed HTML documents. For example, it is required that every meta tag be closed.
Most browsers now-a-days (Firefox and Internet Explorer included) are very forgiving when it comes to poorly-formed HTML documents. For example, it is required that every meta tag be closed.
<b>Hello World</b>Traditionally, some tags were never closed:
<p>Hello World!This caused problems. The browser would have to determine where the tag was to end and when you present this feature in an XML document (A tree based architecture, nodes, branches, etc...) the
tag represents a node and the node MUST be closed.
XHTML is the first step to document standardization. It requires four aspects of programming to be considered a well-formed document. They are:
- All elements must be properly nested.
- All elements must be closed.
- All elements must be lowercase.
- All documents must have one root node (I.E. <html>)
