title: Is it possible to append data into a html element using DOM in Javascript?
body: <p>I have looked for duplicate questions, however many refer to adding data to XML
  please forgive me if I have missed something here but I need some help</p>
  
  <p>so far I have this:</p>
  
  <p>html page</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Template&lt;/title&gt;
  &lt;script type="text/javascript" src="script/controlpanelAdmin.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="script/controlpanelModerator.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="script/jquery-1.12.0.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="script/css.css" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;fieldset id="control_panel"&gt;
  &lt;legend&gt;Control Panel&lt;/legend&gt;
  &lt;/fieldset&gt;
  
  &lt;p id="content"&gt; Content &lt;/p&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>controlpanelAdmin.js</p>
  
  <pre><code>window.onload = function() {
  
  var controlpanel = document.getElementById("control_panel");
  var para = document.createElement("p");
  var att = document.createAttribute("admin");
  var br = document.createElement("br");
  var txt = document.createTextNode("Admin Control Panel");
  
  
  
  controlpanel.appendChild(para);
  para.setAttribute("id", att);
  para.appendChild(txt);
  para.appendChild(br);
  }
  </code></pre>
  
  <p>controlpanelModerator.js</p>
  
  <pre><code>window.onload = function() {
  
  var controlpanel = document.getElementById("control_panel");
  var para = document.createElement("p");
  var att = document.createAttribute("mod");
  var br = document.createElement("br");
  var txt = document.createTextNode("Moderator Control Panel");
  
  
  
  controlpanel.appendChild(para);
  para.setAttribute("id", att);
  para.appendChild(txt);
  para.appendChild(br);
  }
  </code></pre>
  
  <p>When the page loads, 'Admin Control Panel' is written into the fieldset tag
  but is then replaced by: 'Moderator Control Panel'</p>
  
  <p>I cannot for the life of me think how to append both lines (and maybe other data as well) into one element</p>