Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <body class="bg-gray-200 ">
<div class="bg-white shadow-sm rounded px-8 pt-6 pb-8 my-5 container mx-auto max-w-lg text-center">
  
    <h2 class="text-3xl font-bold mb-4">Open Windows</h2>
<textarea id="a" class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline resize-none h-64"></textarea>
<br>
<input type="button" value="Open Windows" onClick="openWindow()"
class="bg-blue-300 hover:bg-blue-400 text-white font-bold py-2 px-4 border-b-4 border-blue-400 hover:border-blue-500 rounded">
<input type="button" value="Clear" onClick="document.getElementById('a').value=''"
class="bg-blue-300 text-white font-bold py-2 px-4 border-b-4 border-blue-400 hover:border-red-600 rounded transition duration-500 ease-in-out hover:bg-red-500 transform hover:scale-105">
  </div>
  <div class="bg-red-500 sm:bg-green-500 md:bg-blue-500 lg:bg-pink-500 xl:bg-teal-500">Width</div>
</body>

              
            
!

CSS

              
                /* html,
body {
  text-align: center;
  height: 99%;
  width: 99%;
}

textarea {
  height: 80%;
  width: 90%;
  border-radius: 2%;

  /*   border:none; */
}

/* input[type="button"] {
} */
 */
              
            
!

JS

              
                function openWindow() {
  var x = document.getElementById("a").value.split("\n");
  atTime = 0;
  for (var i = 0; i < x.length; i++) {
    if (x[i].indexOf(".") > 0) {
      site = x[i];
      if (x[i].indexOf("://") < 0) {
        site = "http://" + x[i];
      }
      setTimeout(
        "window.open('" + site + "','newwindow','width=400,height=400')",
        atTime
      );
      atTime += 700;
    }
  }
}

              
            
!
999px

Console