The doctype directive occupies the second section in .aspx page or ASP.NET web forms and appears just after the page directive, described in the article How to use Page directive in ASP.NET 4.0

The directive indicates the type of markup, HTML, XHTML, etc., used in the web page. This directive is optional, but Visual Studio 2010 adds it automatically. This is important because:

– Depending on the type of markup you’re using, there may be certain tricks that aren’t allowed.

– It influenced how a browser interprets your web page. If you don’t include a doctype on your web page, Internet Explorer switches itself into a quirks mode. While IE is in this mode, certain information details are details are processed in inconsistent, nonstandard ways. For example If you have a web page that looks dramatically different in Internet Explorer than it does in Firefox, the basic reason may be a missing or invalid doctype.

If you’re working with an existing website that’s based on the somewhat out-of-date HTML standard, this is the doctype you need: