title: How to write a navigation bar in one place and use it across all pages with just html/css/js
body: <p>I'm sure I remember doing this once but can't remember how.</p>
  
  <p>What I'm trying to do is write a navbar in html in one place and have every page take the html code from the file and add it to the page when the page loads. PHP doesn't work (I suspect I need a server for PHP to work which I don't even intend to use)</p>
  
  <p>Something like:</p>
  
  <p>Navbar file:</p>
  
  <pre><code>&lt;div&gt;
      other code...
  &lt;/div&gt;
  </code></pre>
  
  <p>Main webpage file:</p>
  
  <pre><code>&lt;html&gt;
      &lt;header&gt;
      &lt;/header&gt;
  
      &lt;body&gt;
      &lt;/body&gt;
  
      &lt;div&gt;
          put navbar file code here...
      &lt;/div&gt;
  &lt;/html&gt;
  </code></pre>