12 Reasons to Hate XHTML

    I would like to publish it in web development, but there wasn’t enough karma, so far I will publish it here.
    Based on a recent review of HTML5, I wanted to consider the main reasons why the use of XHTML can be considered inappropriate. The indicated reasons were collected from various sources and added based on personal experience.

    So, the main reasons why you should not use XHTML:

    1. From an SEO point of view - you have to write less code in regular HTML, which means that HTML is more optimized for search engines than XHTML;

    2. From the point of view of copyright protection for content (for those who are interested) - HTML is much more difficult to parse (automatically copy) than XHTML, which is just designed to facilitate parsing;

    3. From the point of view of reliability - parsing of the XML document stops at the first error, which makes it impossible to display the page. In turn, HTML will never cause the yellow screen of death Mozilla / FF, which may appear from the slightest incorrect code: an unclosed tag or intersecting tags, or a tag with an invalid attribute, etc. There are cases when IE6 threw an error and refused to load the page further (and this is the loss of visitors, i.e. profit from the site) - the color for such a death screen has not yet been invented. The problem was solved simply by changing the xhtml format to html. Do not forget that sites have content that does not depend on its developer, for example, contextual ads (Direct, Adsense);

    Well, and a few more reasons, smaller:

    4. Internet Explorer 6, and even version 7 do not support application / xhtml + xml;

    5. Layout in HTML is easier and more convenient;

    6. Search engines do not index XHTML as XML documents;

    7. Document.write in scripts in XHTML just doesn't work. Will have to rewrite using the DOM functions;

    8. In the DOM functions themselves, you need to omit all element names in lower case. The same goes for selectors in styles. In XHTML, case is significant.

    9. Content of items

    Also popular now: