title: JavaScript Center Align
body: <p>How can I align the entire script to center? I've never actually coded before in javascript and I just want to modify a quick bookmarklet. I've tried stuff like align=center for different components of the script but no luck. Is there something like <code>&lt;center&gt;</code> (in html) for js?</p>
  
  <p>Thanks</p>
  
  <p>EDIT: basically i want this to be centered on a page</p>
  
  <pre><code>function dEmbed(){
      var iframe = document.createElement("iframe");
      iframe.src = 'http://www.google.com';
      iframe.style.width = w+'px';
      iframe.style.height= h+'px';
      iframe.style.border= "0";
      iframe.style.margin= "0";
      iframe.setAttribute("scrolling","no");
      iframe.setAttribute("id","NAME");
      document.body.insertBefore(iframe, document.body.firstChild);
  }
  </code></pre>