On Oct 8, 2005, at 4:31 PM, Andreas Wahlin wrote:
Because <img /> won't validate as strict html 4.01 :) So, why HTML then, and not XHTML? Well I wass all for cutting edge XHTML yada yada, then I read in this book that there really is no difference AND XHTML makes some JavaScript stuff more complex if you really want to play by the rules. I still have some problems not going XHTML, but then again, why? for example, you're not allowed document.createElement('img'), but rather it should be document.createElementNS(... DTD path to xhtml, 'img) instead. The author spends little over two pages arguing that HTML is better than XHTML (for now). Books is DHTML utopia, from sitepoint, by Stuart Langridge.
The beauty of XHTML is you can then parse it with XML parsers and do tricks with that, etc etc.
Also, I've used document.createElement() just fine in XHTML. While it's probably deprecated in XHTML, it still works just fine.