HTML5 syntax - HTML vs XHTML
html, xhtml
Solution
I guess my true question is is there a reason to switch from XHTML to HTML syntax? I've been using XHTML for years and not sure if there is a reason to switch back. Browser compatibility (IE was sometimes finiky with the application/xhtml+xml mime-type), etc?
As mentioned in a previous answer, `text/html` is gets parsed as HTML and `application/xhtml+xml` gets parsed as XML. Thus, you should use the syntax that matches the MIME type you use.
If you are now serving `text/html` but using XHTML syntax, then you should fix your content to use the HTML5 syntax. You may already be close, since HTML5 allows the XMLesque `/>` empty element syntax for void elements (elements that are always empty, such as `img` and `br`).
If you are now using `application/xhtml+xml`, IE support would be a reason to switch to `text/html` and the HTML syntax if you care about supporting IE.
Trying to write polyglot documents that are correct HTML5 and XHTML5 (for serving different MIME types do different browsers with the same payload bytes) is harder than it seems at first sight and not worth the trouble.
Problem
Even with HTML5 being the path forward for HTML we get two options as developers: XHTML syntax and HTML syntax. I've been using XHTML as my main doctype for 5 or so years so I'm very comfortable with it. But my question is given that non-xml syntax will be allowed, is there any reason to stick with a valid XML syntax? Do you gain anything going with one over another, besides preference (compatibility, etc)? Personally I'll feel a little dirty going back to not closing tags, is second nature to me now, but would I gain something going back to HTML syntax? Update: I guess my true question is is there a reason to switch from XHTML to HTML syntax? I've been using XHTML for years and not sure if there is a reason to switch back. Browser compatibility (IE was sometimes finiky with the application/xhtml+xml mime-type), etc?