Pen Settings



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


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


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.


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.


                <div class="grid">


                header {
  grid-area: header;
  background: green;

aside {
  grid-area: sidebar;
  background: orange;

main {
  grid-area: content;
  background: blue;

footer {
  grid-area: footer;
  background: purple;

.grid {
  display: grid;

  /* This will stack them in a vertical column for a mobile layout. */
  grid-auto-rows: 100px;
  grid-gap: 10px;

@media (min-width: 700px) {
  .grid {
    /* Now we do a traditional grid area. */
      'header  header'
      'sidebar content'
      'footer  footer';
    /* Note that we put header twice because it spans two columns.
       On the next row, we have sidebar and column taking up the row.
       And on the third row, we have footer twice.

       You can also use a dot (.) to indicate a blank area. */

@media (min-width: 1000px) {
  .grid {
    /* Change around the regions at a larger viewport width. */
      'sidebar header header'
      'sidebar content content'
      '.       footer footer';
    /* We're having the Sidebar take up the entire first column. 
       The first column of the last row will be empty. */