The internet is not a place without competitions. Things such as mySQL vs Microsoft SQL, jQuery vs ASP. net and so on. For now, I’ll be debating between the very popular language HTML5 and the dying XHTML5. While XHTML is dying and that there is no doubt that XHTML5 will never go beyond the ink on drafts, XHTML can be used with the HTML5 syntax thus (somewhat) making it XHTML5.
First things first: What are the differences? Really, the answer to this is simple. The HTML5 dosen’t have an ‘X’ and XHTML5 has an ‘X’. But what does this ‘X’ mean? Well, HTML5 is basically a ‘Hyper Text Markup Language 5’ and XHTML5 is ‘Extensible Hyper Text Markup Language’ allowing developers to take advantage of XML (which is where the X came from) and expand their webpage. HTML5 is very loosy when it meets errors: It does not brag about it and ruin your webpage by showing errors but instead will just render it ‘as it is’. This lifts the frustration from developers when they make errors or ‘cheats’. XHTML on the other hand uses a strict XML-like syntax meaning that you will have to close self-closing tags such as:
<link href="stylesheet.css" rel="stylesheet"> - HTML5 <link href="stylesheet.css" rel="stylesheet" /> - XHTML5
Some developers like this type of syntax as it make the webpage ‘tidier’ and the results will be more ‘accurate’ to what they predicted. The XML-like syntax and error will help developers find errors in their codes and rectrify it. However, XHTML dosen’t always work well. If you have a link like this (Youtube):
<iframe width="560" height="315" src="https://www.youtube.com/embed/ca1cHfu1cso?autoplay=1&rel=0" frameborder="0" allowfullscreen></iframe>
XHTML5 will scream about an error with the source url of the iframe as highlighted above. I don’t really know why this happens, but it just happens as such that I find XHTML5 useless.