title: Where is the right place to include a file when working with HTML & php
body: <p>Where is the right place to include a file when working with HTML and php?</p>
  
  <p>Before the HTML code:</p>
  
  <pre><code>&lt;?php include 'file.php' ?&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>In the head tag:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;?php include 'file.php' ?&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>In the body tag:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;?php include 'file.php' ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>