title: Code Does Not Work WIth <!DOCTYPE html> at the top
body: <p>I have <code>&lt;!DOCTYPE html&gt;</code> at the top of my page and what the page is suppose to do is allow the user to click anywhere on the page, and then redirect to another URL.</p>
  
  <p>It works when I remove <code>&lt;!DOCTYPE html</code> but I would like to keep it in the page</p>
  
  <p>here is the code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  
  &lt;head&gt;
  
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  
  &lt;title&gt;Untitled Document&lt;/title&gt;
  
  &lt;style&gt;
      BODY.enterPage{
        cursor:hand;
      }
  &lt;/style&gt;
  &lt;script&gt;
    function goto(){
      location.href = "http://www.google.com"
    }
  &lt;/script&gt;
  &lt;/head&gt;
  
    &lt;body class="enterPage" onclick="goto();"&gt;
  
    Your Content
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>why does this happen?</p>