title: Add text/HTML before the end of the 'body' tag
body: <p>I have a string (not <a href="https://en.wikipedia.org/wiki/Document_Object_Model" rel="nofollow noreferrer">document object</a>) which contains a whole HTML document:</p>
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;
          &lt;style type=&quot;text/css&quot; style=&quot;display:none;&quot;&gt;
              &lt;!-- P {margin-top:0;margin-bottom:0;} --&gt;
          &lt;/style&gt;
      &lt;/head&gt;
  
      &lt;body dir=&quot;ltr&quot;&gt;
          Bla bla
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>And some text or other HTML code, which I need to insert before end of the 'body' tag in the first HTML.</p>
  <p>In which way is it better to do this?</p>
  <ul>
  <li>Convert the string to HTML?</li>
  <li>Insert text or HTML in it</li>
  <li>Convert the result to a string</li>
  </ul>