Include HTML5 file in another HTML5 file
<p>A moron-level question here: how do I include one HTML5 file (like a navigation bar or sidebar) inside another one? I would prefer not to have to copy/paste all of the same stuff over and over across a website.</p>

<p>I've done a lot of searching through this site so far, and all of the answers I've found so far seem to strip all of the formatting and css from the "included version". If it helps, I'm using GitHub Pages and an HTML5 template to make a personal website, which sorta leaves out server-side stuff like server-side includes or PHP (I hear those don't work there).</p>

<p>What I've got right now:</p>

<pre><code>&lt;!--some html--&gt;
&lt;header id="header"&gt;
    &lt;a href="index.html" class="logo"&gt;Some text&lt;/a&gt;
    &lt;ul class="icons"&gt;
        &lt;li&gt;Some more stuff that I want to include &lt;/li&gt;
    &lt;/ul&gt;
&lt;/header&gt;
&lt;!--more html--&gt;
</code></pre>

<p>And then <a href="https://stackoverflow.com/a/12995846/7300125">this solution</a> results in the HTML getting included, but all of my styling getting stripped. I also tried <code>&lt;embed&gt;</code> and got the same result.</p>

<p>Main file:</p>

<pre><code>&lt;!--some html--&gt;
&lt;object name="foo" type="text/html" data="header.html"&gt;&lt;/object&gt;
&lt;!--more html--&gt;
</code></pre>

<p>Header file to include (header.html):</p>

<pre><code>&lt;header id="header"&gt;
    &lt;a href="index.html" class="logo"&gt;Some text&lt;/a&gt;
    &lt;ul class="icons"&gt;
        &lt;li&gt;Some more stuff that I want to include &lt;/li&gt;
    &lt;/ul&gt;
&lt;/header&gt;
</code></pre>