Originally Posted by Dr John
Wrong.
HTML and css is just as clean and easy to use as XHTML. HTML can be as totally free of presentation mark-up as XHTML. You are confusing the way people used to code their HTML with lots inline styles, and the way when XHTML came out and early adopters all went for no inline styles and css. You can add as many inline styles to your XHTML as you want, and it will render (but may not validate), and have no inline styles in your HTML and lots of css, if you want. It's just that you have seen the early adopters of XHTML immediately reject the inline styles and assumed, wrongly, that HTML could not do that.
It's a frame of mind, and early users of HTML had the wrong frame of mind (mixing content and presentation) while early users of XHTML had the right frame of mind (total separation of content and presentation). But the ideas they used in their XHTML were perfectly applicable to HTML, it was just that most people didn't do it. Take any of your XHTML pages and change the doctype to html 4.01 strict, remove any closing /> that html doesn't require, and low and behold, it will render correctly in most modern browsers. Any errors in rendering will be due to IE bugs, not HTML not being as capable.
The tag soup problem from several years ago was not a feature of HTML, it was a feature of poor, unskilled, careless coders, with some browsers, mainly IE, being more capable of interpreting this erroneous code, and thus those poorer coders produced more dud code, unaware of it's errors. If they had bothered to validate the code, it should have been detected as erroneous. But they didn't bother, as IE worked out what they meant (usually, not always). You can write tag soup in XHTML, it's just that those who imagine it is better are more careful and avoid it, and they do tend to validate their code, the errors are detected and they correct the errors. You can't blame HTML for tag soup and messy code. It was just as wrong in HTML as it is in XHTML.
PS HTML 5 will not be used for at least another 5 years, probably even longer. So forget about that for a while.
|