Need of XHTML
XHTML became a W3C recommendation in 2000, and within the next five years we did see many websites framed in XHTML standard.
Prior to XHTML, HTML was the successfully running coding standard on the web, and shared wide popularity. But the amazing thing however is that even after the release of XHTML as the new recommended markup language, HTML did not cease to evolute. Neither did the websites which were framed in HTML stopped to function.
HTML uses XSL to transform it into XML and that too only when HTML is also a well formed XML. Whereas in XHTML, direct transformation with XML can take place.
XHTML was a recommendation of W3C, but it did not condemn the earlier language. Webmasters were also reluctant to use XHTML any soon, given the complexity it involved and the skepticism that comes with everything that’s new. Few webmasters also believed that XHTML would slow down the browser’s speed. To a casual Internet user, an application seems fine as long as it is visually satisfying and user friendly. The HTML websites were running successfully and web designers found it irrelevant to switch to any new method.
Yet the advanced technologies hammered the need of XHTML, and this pushed the designers to leave their doubts and accept XHTML as a comfortable mark-up language. XHTML on the better side, is not entirely different from HTML. They aren’t two different languages altogether. They can be said as two different dialects of the same language.
Benefits of XHTML
They say, “Necessity is the mother of all inventions”. The need for XHTML did not show up when HTML was used successfully by web designers, because that era was not marked by the advanced technologies. Coding was desktop complaint but did not consider the compatibility with 3G Phones. Neither did it apprehend the fast arrival of different web browsers like Google Chrome, Mozilla and others.
Also, the cascading style sheet is capable of controlling all the aspects of page presentation and layout. This saves a lot of precious time of the coder and also helps to cut down the amount of code needed to display a web page properly. So in this context, XHTML offers a dual benefit. And as all major browsers support the Cascading Style Sheets, they can be used without any hitch.
HTML doesn’t bother about proper nesting of the tags, whereas XHTML considers proper nesting of tags which makes it syntax error free.