asp.net master page validation w3c schools
<p>I am validing the default.aspx(uses master page) of my web site, however; I am unable to get it to pass validation because of the The information that comes before the 

<pre><code>&lt;%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="EMSWebSite._Default" %&gt;

&lt;asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"&gt;
    &lt;link href="Styles/style.css" rel="stylesheet" type="text/css" /&gt;
&lt;/asp:Content&gt;
&lt;asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
</code></pre>

<p>Validation Output: 3 Errors</p>

<pre><code>Error Line 2, Column 1: character "&lt;%" not allowed in prolog

&lt;%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEve…

✉
Error Line 8, Column 80: document type does not allow element "asp:Content" here

&lt;asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"&gt;

✉

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
Error Line 10, Column 3: "DOCTYPE" declaration not allowed in instance

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.o…
</code></pre>
