title: Merge two HTML files into a single master HTML file
body: <p>I want to merge two different html files into one,</p>
  
  <p>html1.html</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;
      &lt;link href="blah.css" rel="stylesheet" type="text/css" /&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;h1 id="logo"&gt;
          &lt;span class="test1"&gt;Test text&lt;/span&gt;    
      &lt;/h1&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>html2.html</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;
      &lt;script src="blah.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;h1 id="logo"&gt;
         &lt;span&gt;Test text&lt;/span&gt;
         &lt;div class="test2"&gt;teststetset&lt;/div&gt; 
      &lt;/h1&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I want to take these two files and make a master file that would look like this:</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;
      &lt;link href="blah.css" rel="stylesheet" type="text/css" /&gt;
      &lt;script src="blah.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;span class="test1"&gt;Test text&lt;/span&gt;
      &lt;div class="test2"&gt;teststetset&lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I want to know is this possible using php or any library or using Linux command? </p>