|
The two main differences between XHTML and HTML is that XHTML elements need to be properly nested (so <div><p>text</div></p> is not acceptable, <div><p>text</p></div> is acceptable) and all XHTML elements need to be closed (this includes elements like img, hence the closing slash: <img src="example.gif" alt="example"/>). In other words, XHTML needs to be "well-formed". So in theory, XHTML (Strict, Frameset, and Transitional) is supposed to be in XML format.
The whole goal of separating content from presentation applies to both HTML and XHTML. This includes not using tables for presentation, <font>, align=, bgcolor=, etc., and instead using CSS. The definitions of XHTML, as defined by the W3C was a little more refined in this goal, as XHTML as a whole is a little more strict in the terms of which elements are allowable and which are not.
The difference between XHTML strict and transitional is that XHTML transitional is just a little bit more liberal. It still contains the same rules for being well-formed. I view XHTML transitional (and its HTML counterpart, HTML loose) as a markup that's to be used when X/HTML strict and CSS fail to do the job. This was more the case when browsers were much worse with rendering and following standards than they are today. In most cases today, there is generally a way to do something in XHTML and CSS that will work in all of the important browsers, so I personally don't think XHTML transitional is needed anymore, and I doubt that it will be included in XHTML 2.
__________________
The interlocking pieces of web development: usability, performance, accessibility, and standards.
|