<p>When developing a new web based application which version of html should you aim for?</p>

<p>EDIT:</p>

<p>cool I was just attempting to get a feel from others I tend to use XHTML 1.0 Strict in my own work and Transitional when others are involved in the content creation.</p>

<p>I marked the first XHTML 1.0 Transitional post as the 'correct answer' but believe strongly that all the answers given at that point where equally valid.</p>

[{'answer_id': 3655, 'author': 'Dillie-O', 'author_id': 71, 'author_profile': 'https://Stackoverflow.com/users/71', 'pm_score': 4, 'selected': True, 'text': "<p>I'd shoot for XHTML Transitional 1.0. There are still a few nuances out there that don't like XHTML strict, and most editors I've seen now will give you the proper nudges to make sure that things are done right.</p>\n"}, {'answer_id': 3656, 'author': 'Teifion', 'author_id': 1384652, 'author_profile': 'https://Stackoverflow.com/users/1384652', 'pm_score': 2, 'selected': False, 'text': '<p>Anything that renders your page is will do so regardless of which popular standard you use. XHTML is stricter and probably "better" but I can\'t see what advantages you will get with one standard over another.</p>\n'}, {'answer_id': 3659, 'author': 'Michael Stum', 'author_id': 91, 'author_profile': 'https://Stackoverflow.com/users/91', 'pm_score': 1, 'selected': False, 'text': '<p>Personally, I prefer XHTML 1.0 Transitional.</p>\n\n<p>XHTML is XML based, so it allows easier parsing and you can also use the XML Components of most IDEs to programatically query and insert stuff.</p>\n\n<p>Transitional is not as strict as strict, which makes it relatively easy to work with, compared to strict which can often be a PITA. <a href="http://brainstormsandraves.com/archives/2003/10/21/xhtml/" rel="nofollow noreferrer">Comparison between Transistional and Strict</a></p>\n\n<p>1.0 is "more compatible" than 1.1 and 1.1 seems to be still under some sort of development.</p>\n'}, {'answer_id': 3660, 'author': 'Justin Bennett', 'author_id': 271, 'author_profile': 'https://Stackoverflow.com/users/271', 'pm_score': 2, 'selected': False, 'text': "<p>Dillie-O is right on with his answer of XHTML 1.0 Transitional but I would suggest shooting for XHTML 1.0 Strict and only falling back on Transitional if there's some piece of functionality you absolutely need that Strict is not allowing.</p>\n"}, {'answer_id': 3699, 'author': 'Lauren', 'author_id': 265, 'author_profile': 'https://Stackoverflow.com/users/265', 'pm_score': 5, 'selected': False, 'text': '<p>HTML 4.01. There is absolutely <strong>no reason</strong> to use XHTML for anything but experimental or academic problems that you only want to run on the \'obscure\' web browsers.</p>\n\n<p>XHTML Transitional is completely pointless even to <em>those</em> browsers, so I\'m not sure why anyone would aim for that. It\'s actually pretty alarming that a number of people would recommend that.</p>\n\n<p>I\'d say aiming for HTML 4.01 is the most predictable, but Teifion is right really, "anything that renders your page will do".</p>\n\n<p>in response to <a href="https://stackoverflow.com/questions/3654/html-version-choice#3659">Michael Stum</a>:</p>\n\n<blockquote>\n  <p>XHTML is XML based, so it allows easier parsing and you can also use the XML Components of most IDEs to programatically query and insert stuff.</p>\n</blockquote>\n\n<p>This is certainly not true. A lot of XHTML on the web (if not most) does not conform to XML validity (and it needn\'t - it\'s not being sent as XML). Trying to treat this like XML when dealing with it is just going to earn you a lot of headaches. This page on Stack Overflow, for instance, will generate errors with many unforgiving XML tools for having invalid mark-up.</p>\n'}, {'answer_id': 3936, 'author': 'graham.reeds', 'author_id': 342, 'author_profile': 'https://Stackoverflow.com/users/342', 'pm_score': 1, 'selected': False, 'text': "<p>I aim for XHTML 1.0 Trans. It's better to conform so when bugs are fixed in the browsers you won't suddenly be working against the clock trying to figure out what actually needs changing.</p>\n\n<p>In my opinion 1.1 is borked and 2.0 has been smashed to smithereens: Do I really need/want a header/footer tag?</p>\n"}, {'answer_id': 3943, 'author': 'Michael Stum', 'author_id': 91, 'author_profile': 'https://Stackoverflow.com/users/91', 'pm_score': 2, 'selected': False, 'text': "<p>@Mike:</p>\n\n<p>While I agree that validity is not needed to make a page render (after all, we have to keep IE6 compatibility in...), creating valid XHTML that IS compatible AND valid is not a problem. The problems start when people are used to HTML 4 and using the depreciated tags and attributes.</p>\n\n<p>Just because the Web is a pile of crap does not mean that every new page needs to be a pile of crap as well. Most Validation errors on SO are so trivial, it shouldn't take too long to fix, like missing quotes on attributes.</p>\n\n<p>But it may still be kind of pointless, given the fact that the W3C does not have any idea where they want to be going anyway (see HTML 5) and a certain big Browser company that also makes operating systems does not care as well, so a site could as well send out it's doctype as HTML 1337 Sucks and browsers will still try to render it.</p>\n"}, {'answer_id': 20324, 'author': 'Ross', 'author_id': 2025, 'author_profile': 'https://Stackoverflow.com/users/2025', 'pm_score': 1, 'selected': False, 'text': "<p>I'm all for XHTML Strict every time. I strongly believe that HTML should be more like XML. It's not hard to validate it if you know XML and the W3's validator ipoints you on the right track anyway.</p>\n\n<p>XHTML 2.0 is heading toward what the W3 have been aiming for for a long time - the semantic web. The best benefit of XHTML 2.0 for me is that every conformant page on the web will be understandable as content, or an article (for that's what pages are - documents) becuase they all apply to the same standard. You would then be able to construct intepreters (i.e. browsers) that present the content in a completely different manner - there's literally thousands of ideas waiting here.</p>\n"}, {'answer_id': 20487, 'author': 'Chris', 'author_id': 2134, 'author_profile': 'https://Stackoverflow.com/users/2134', 'pm_score': 2, 'selected': False, 'text': '<p>There are some <a href="http://friendlybit.com/html/why-xhtml-is-a-bad-idea/" rel="nofollow noreferrer">compelling</a> <a href="http://www.autisticcuckoo.net/archive.php?id=2005/03/14/xhtml-is-dead" rel="nofollow noreferrer">warnings</a> about the usage of XHTML, primarily centering around the fact that the mime-type for such a document should be sent as:</p>\n\n<p><code>Content-type: application/xhtml+xml</code></p>\n\n<p>Yet IE 6 and 7 don\'t support this, and then websites must send it as:</p>\n\n<p><code>Content-type: text/html</code></p>\n\n<p>Unfortunately that method is <a href="http://www.hixie.ch/advocacy/xhtml" rel="nofollow noreferrer">considered harmful</a>.</p>\n\n<p>Some also bemoan the fact that although the intent of XHTML is to make web pages parsable by an XML parser, it has in practice failed due to incorrect usage on existing websites.</p>\n\n<p>I still prefer to write documents in XHTML 1.0 Strict, mostly because of the challenge, and the <a href="http://www.alistapart.com/articles/betterliving/" rel="nofollow noreferrer">cleanliness</a> and error-checking that a <a href="http://validator.w3.org/" rel="nofollow noreferrer">validator</a> gives.  I enjoy the syntax a bit better, because it forces me to be very explicit in when tags end, etc.  It\'s more for me a personal choice than purely technical.</p>\n'}, {'answer_id': 194049, 'author': 'Kornel', 'author_id': 27009, 'author_profile': 'https://Stackoverflow.com/users/27009', 'pm_score': 3, 'selected': False, 'text': '<p><strong>Transitional</strong> flavors of XHTML and HTML are deprecated. They were intended only <strong>for old user-agents that don\'t support CSS</strong>. See <a href="http://www.w3.org/TR/REC-html40/sgml/loosedtd.html" rel="nofollow noreferrer">explanation in the DTD</a>.</p>\n\n<p>W3C advises that you should use Strict whenever possible, and these days it\'s certainly possible.</p>\n\n<p>Transitional version has already been removed in XHTML/1.1 and HTML5.</p>\n\n<hr>\n\n<p>XHTML/1.0 has exactly the same elements and attributes (semantics) as HTML4. The XHTML/1.0 specification doesn\'t even specify any elements! For anything else than syntax, it refers to HTML4.</p>\n\n<p>Additionally, you\'ll be unable to use any feature of XHTML that is not available in HTML (namespaces, XML DOM) if you send documents as <code>text/html</code>, and unfrortunately that is required for compatibility with IE and other HTML-only browsers.</p>\n\n<p>In 2008 the correct choice would be HTML4 Strict:</p>\n\n<blockquote>\n  <p><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;</code></p>\n</blockquote>\n\n<p>but as of 2016, there\'s only <a href="https://html.spec.whatwg.org/multipage/" rel="nofollow noreferrer">one version of HTML</a> that matters.</p>\n\n<pre><code> &lt;!DOCTYPE html&gt;\n</code></pre>\n'}, {'answer_id': 194117, 'author': 'Shadow2531', 'author_id': 1697, 'author_profile': 'https://Stackoverflow.com/users/1697', 'pm_score': 1, 'selected': False, 'text': '<p>If you want to use XHTML 1.0 in an HTML-compatible way, that\'s fine. However, do note that the W3C validator and the XHTML DTDs know nothing about mime types and how browsers behave differently (like &lt;map&gt; name/id matching) between them. The DTDs know nothing about how well browsers support certain elements (like &lt;embed&gt; for example) either.</p>\n\n<p>What this means is that the XHTML DTDs and the validator don\'t reflect reality and trying to conform to them is pointless.</p>\n\n<p>If you want to use XHTML just so you can close certain elements with /> (where html-compatible), just use HTML5 markup (so the browser is in full standards mode). HTML5 allows the use of /&gt; in an HTML-compatible way (the same HTML-compatible way you have to do it when using XHTML 1.0 markup with text/html). Then, just stick to what works (you know better than some DTD) in browsers.</p>\n\n<pre><code>&lt;!DOCTYPE html&gt;\n&lt;html lang="en"&gt;\n    &lt;head&gt;\n        &lt;meta charset="utf-8"/&gt;\n        &lt;title&gt;&lt;/title&gt;\n    &lt;/head&gt;\n    &lt;body&gt;\n        &lt;p&gt;Line1&lt;br/&gt;Line2&lt;/p&gt;\n        &lt;p&gt;&lt;img src="" alt="blank"/&gt;&lt;/p&gt;\n        &lt;p&gt;&lt;input type="text"/&gt;&lt;/p&gt;\n        &lt;p&gt;&lt;embed type="application/x-something" src=""/&gt;&lt;/p&gt;\n    &lt;/body&gt;\n&lt;/html&gt;\n</code></pre>\n\n<p>Then, use <a href="http://validator.nu/" rel="nofollow noreferrer">http://validator.nu/</a> to make sure it\'s well formed at least.</p>\n'}, {'answer_id': 194158, 'author': 'Joeri Sebrechts', 'author_id': 20980, 'author_profile': 'https://Stackoverflow.com/users/20980', 'pm_score': 0, 'selected': False, 'text': "<p>I don't think it actually matters whether you use XHTML or plain HTML. The end goal here is to have low maintenance and quick development through a predictable rendering. You can get this from using xhtml or html, as long as you have validating code. I've even heard arguments that it's best to target quirks mode, because new versions of browsers don't change quirks mode, so maintenance is easy.</p>\n\n<p>In the end, it all becomes tag soup, for good reason, because getting web app developers to write error-free html means asking them to write bug-free code. Validators are no help, because they only validate the initial page view. This is also why I've never seen the point in xhtml served as xml for anything beyond static sites. The level of arrogance a web apps developer would need to have to serve up their web app as xml is staggering.</p>\n"}, {'answer_id': 213273, 'author': 'mattl', 'author_id': 28400, 'author_profile': 'https://Stackoverflow.com/users/28400', 'pm_score': -1, 'selected': False, 'text': '<p>HTML 4.0 Strict, or ISO HTML.</p>\n'}, {'answer_id': 2036932, 'author': 'user86297', 'author_id': 86297, 'author_profile': 'https://Stackoverflow.com/users/86297', 'pm_score': 1, 'selected': False, 'text': '<p>If you have tools to generate your XHTML like any other XML document, then go with XHTML. But when you just use plain text templates, text concatenation, etc. you are OK with good old HTML 4.01.</p>\n\n<p>Browsers now start to support this 10 year old standard.</p>\n\n<p>Important: <a href="http://hsivonen.iki.fi/producing-xml/" rel="nofollow noreferrer">Avoid being called a bozo when producing XML</a></p>\n'}]
['https://Stackoverflow.com/questions/3654', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/269/']