title: dynamically create div element using javascript
body: <p>I am trying to create html elements dynamically using javascript. For example, when creating a paragraph in my "finalXML" file, I use the syntax below:</p>
  
  <pre><code>function paragraph (finalXML, value)
  
  {
  
  var code1 = 'var para = document.createElement("p");
  var t = document.createTextNode("This is the paragraph that should be displayed");
  para.appendChild(t);
  document.body.appendChild(para);'
  
  return String(finalXML).replace(/add_paragraph_here/g,code1);
  }
  </code></pre>
  
  <p>How would I go about creating a div with radio buttons, for example, using the same process? Can anyone help me with that syntax?</p>