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
You can step up to XHTML strict with Visual Studio 2010, by using this doctype:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”