Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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.


Auto Save

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="wrapper">
  <div class="area e">Area E</div>
  <div class="area f">Area F</div>
  <div class="area a">Area A</div>
  <div class="area d">Area D</div>
  <div class="area b">Area B</div>
  <div class="area c">Area C</div>


                .wrapper {
  display: grid; // Hey, this is a grid layout
  // grid-template-columns: 1fr 1fr 1fr 1fr 1fr; 
  /* instead of '1fr 1fr 1fr 1fr 1fr' for 5 columns, you can use the repeat() syntax if they're all going to be one size
  grid-template-columns: repeat(5, 1fr); // for a 12-column grid, you can easily have it with repeat(12, 1fr)
  grid-template-rows: 1fr 1fr 1fr 1fr 1fr; // using fr avoids margin and padding issues
  grid-gap: 0.5em;
    "A A A B E"
    "C D D B F";
  // grid-template-areas:
  //   "b"; // will show only area B on the grid
  div {
    background: gainsboro;
    padding: 1em;
  .a {
    grid-area: A; // Place it at the 'A' position in the grid template
    background: pink;
    content: "Area A";
  .b {
    grid-area: B;
    background: lightgreen;
  .c {
    grid-area: C;
    background: paleturquoise;
  .d {
    grid-area: D;
    background: plum;
  .e {
    grid-area: E;
    background: lavender;
  .f {
    grid-area: F;
    background: papayawhip;