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 id="div1">
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In maximus sagittis arcu, ac porta lectus porttitor id. Quisque porta consequat ipsum, eu laoreet nunc egestas ut. Fusce elit nisi, suscipit ut nulla vitae, ullamcorper tempor mauris. Cras ac imperdiet risus. Morbi euismod ligula eget aliquet tincidunt. Suspendisse in mi eget leo sollicitudin mattis. Integer sed ante in arcu dapibus efficitur. Nulla id iaculis orci.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla maximus enim ac elit accumsan dictum. Nam tincidunt fermentum libero. Proin nulla nisl, ultricies vitae tristique et, maximus tincidunt nisi. Curabitur nec ultricies nibh, sit amet sollicitudin velit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin euismod turpis ut dictum eleifend.</p>
  <div id="div2">2</div>
  <div id="div3">3</div>
  <div id="div4">
    <div id="div5">5</div>
    <div id="div6">6</div>


                body {
  box-sizing: border-box;
main {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, minmax(46vh, 1fr));
  grid-gap: 1em;
div {
  border: 1px solid grey;
  padding: 0.5em;
#div1 {
  grid-column: 1 / 4; 
  grid-row: 1;
  background-color: gold;
#div2 {
  grid-column: 1;
  grid-row: 2;
  background-color: lightblue;
#div3 {
  grid-column: 2;
  grid-row: 2;
  background-color: lavender;
#div4 {
  grid-column: 3; 
  grid-row: 2;
  background-color: lightpink;
  /* #div4 is also a grid! */
  display: grid;
  grid-gap: 1em;
    "div5 div6 div6"
#div5 {
  grid-area: div5;
  background-color: blanchedalmond;
#div6 {
  grid-area: div6;
  background-color: burlywood;