About a decade ago  the world wide web was facing a serious problem(a problem the world still faces though).Let’s see if you can spot it. A study says that almost 99% websites in the world have atleast 1 bad line of code. Yea thats it broken HTML problem. The fact the browsers have been fiercely forgiving and have allowed almost every bad coding practice to flourish. Examples-you write your code without the title tag.The html documentation states that the document is not complete without a title tag but still the browser displays the document without an error message. Although the HTML gurus(the people who form HTML documentation) tried to correct this issue by exporting current standards to a new evolving  technology- XML(another markup language – with a difference though). One great thing about XML was its non forgiving nature i.e if a code didn’t match the standard an error message is displayed instead of the document.

W3c though maybe this new technology can fix the existing violations of there long cherished standard- they renamed it XHTML.

XHTML is almost similar to HTML4 but with a new fix. It is reformulated  in XML(you dint get it!!).

A THING ABOUT XML-XML i s a language which lays rules  to form other markup language. You can call XML as a standard for writing other markup languages.

So XHTML appeared on the scene. It said that the header must contain a line i.e CONTENT-TYPE: application/xhtml+xml. For browser to render it the way XHTML should be render(the non forgiving HTML way). This meant now everything was fine(thats wat w3c thought). No piece of code will the displayed and web world will again be as sweet as it was.But the dreams were broken.And it was just 1 line in its documentation which helped find developers a loophole in the entire new HTML.

It said that it is alright to code your document in XHTML but you can surely use the prevailent  content-type: text/html, so even if you right your code with XHTML rules its still will be rendered in the old forgiving way i.e  write your doctype for XHTML snas the content-type: application/XHTML-XML and you are good to go. So everything from your lower case tags to every tag that is closed is a labor done in vain.

So, XHTML was a step in right direction but with bad foot…;)

Advertisements