Since ASP.NET controls output HTML, is there a particular Doctype that works better with the kind of HTML they're likely to output? Are some Doctypes more flexible than others for this kind of usage?
I'm using C# on the server-side, if that's relevant.
You need to use XHTML when using .net because of the attributes it adds to certain elements. Use XHTML doctype in order to validate
When a new .aspx page is created in Visual Studio it includes the xhtml 1.0 transitional doctype by default. I would stick to that unless you'd rather go with xhtml 1.0 strict.
Doctype depends on features you want in HTML.
I use HTML 4.01 strict, but that's just my preference. There is no "optimum".
By default, asp.net outputs html that is xhtml transitional compliant. You can adjust this by changing a setting in the web.config.
<system.web> <xhtmlConformance mode="Strict" /> </system.web>
For instance will make asp.net spit out xhtml strict code.