title: Why does content outside the body still display?
body: <p>hi I am new to coding as I read in html only the content of the  tag will be displayed but in my case even the content outside the  tag also displaying why is it so? am I doing any mistakes here.</p>
  
  <p>below is the code,</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
      &lt;head&gt;
          &lt;title&gt;Page Title&lt;/title&gt;
      &lt;/head&gt;
          Welcome html learner
      &lt;body&gt;
  
          &lt;h1&gt;My First Heading&lt;/h1&gt;
          &lt;p&gt;My first paragraph.&lt;/p&gt;
  
      &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>
  
  <p>Here in scenario 2 the content outside the body is also displaying.</p>