HTML may appear similar at first, but in actuality XHTML is the combination of HTML and XML to allow it to be less complicated for non-traditional browsers (like those on a mobile phone). While it is less flexible than HTML (for example, every bracket must be closed, ie <br> has to be written as <br />, so that the backslash properly closes the element), it is cleaner, so it can be interpreted faster by browsers that don’t have as much resources to calculate odd elements. The article about XHTML from W3C itself is here.

It is basically a streamlining and standards issue. Web standards basically ensure that the site code is as uncomplicated as possible while at the same time making sure that the site can be viewed by as many people as possible (accessible) and will be able to be seen for years to come. The World Wide Web Consortium (or W3C) sets out recommendations as to what language would be most accessible and streamlined. This also fits into accessibility, but it also makes sure that each site is viewed the same way in every browser, and it won’t be like it was 10-15 years ago when each site had a “best viewed in…” statement.

Unfortunately, not all browsers are completely compatible. Internet Explorer is the biggest culprit, which is sad considering they have 76% of the usage share. While they support most standards, they do not support XHTML, and will only show it if it was written similarly to HTML. This will hopefully be fixed with IE8, as elaborated on in Fix the Compatibility Problems with IE8 Beta. Mozilla Firefox does support XHTML, but it does not pass the Acid2 test, which tests for rendering flaws in browsers. Opera does not render the Acid2 test as well (see Unintentionally Blank’s article Opera and Safari Hunt Down Bugs to Pass Acid 3).

CSS is a stylesheet language that defines the page’s presentation, including color and fonts. It is more flexible than defining these elements in HTML or XHTML and it allows for a different type of theme to show up based on the requirements of the browser, allowing for greater accessibility.

Advertisements