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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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="container">
  <header class="header">.header</header>
  <main class="main" contenteditable>YOU CAN TEST BY EDIT THIS TEXT.</main>
  <aside class="aside aside--1">.aside--1</aside>
  <aside class="aside aside--2">.aside--2</aside>
  <aside class="aside aside--3">.aside--3</aside>
  <footer class="footer">.footer</footer>


                /* ---------- Skip this base code ---------- */
* { box-sizing: border-box; } body { margin: 16px; color: #fff; } .header, .main, .aside, .footer { padding: 16px; } .header { background: #001f3f; } .main { background: #FF4136; } .aside--1 { background: #0074D9; } .aside--2 { background: #7FDBFF; } .aside--3 { background: #39CCCC; } .footer { background: #aaa; }

/* ---------- For all ---------- */
.container {
  display: grid;
  gap: 16px;

/* ---------- For mobile ---------- */
@media (max-width: 960px) {
  .container { grid: minmax(120px, auto) minmax(240px, auto) repeat(4, minmax(120px, auto)) / 1fr 1fr; }
  .footer { grid-area: auto / span 2; }

/* ---------- For desktop ---------- */
@media (min-width: 961px) {
  .container { grid: minmax(120px, auto) minmax(480px, auto) minmax(240px, auto) minmax(120px, auto) / 2fr 1fr 240px; }
  .footer { grid-area: auto / span 3; }
  .main { grid-area: auto / span 2 ; }
  .aside--3 { grid-area: 2 / -2 / span 2; }


                const dummyHTML = '<p>Irure aliqua irure excepteur duis eu consequat ea. Velit reprehenderit veniam exercitation irure. Et ullamco velit occaecat cupidatat mollit excepteur aliqua ex ipsum.</p><p>Nostrud reprehenderit Lorem officia laboris incididunt consequat adipisicing dolor. Sunt aliqua anim velit enim Lorem tempor officia. Irure id sunt adipisicing enim ut tempor culpa Lorem cupidatat sit sint.</p><p>Velit dolore adipisicing sunt pariatur aliqua esse dolore. Esse in exercitation nulla dolore in consectetur nostrud nisi et reprehenderit non labore. Elit fugiat laborum irure consectetur voluptate dolore eu consequat. Id commodo sit reprehenderit aliqua occaecat ad ad adipisicing do ea. Tempor do irure elit fugiat veniam mollit. Qui aliqua ex ex sunt labore. Ut Lorem esse cillum ad commodo esse ipsum irure aliquip minim nostrud.</p><p>Magna ullamco qui non consectetur aliquip. Nostrud nostrud quis eu esse do laboris consequat reprehenderit irure aliqua. Ex duis mollit velit ea exercitation voluptate. Commodo anim laborum et ex magna ex id ipsum. Dolore occaecat veniam irure reprehenderit consequat dolore elit culpa laboris esse reprehenderit velit.</p><p>Culpa quis Lorem duis officia deserunt tempor minim ex aliqua officia. Sint velit aliquip quis amet sunt magna. Aliquip sunt laborum exercitation et culpa duis mollit reprehenderit nisi nostrud esse proident aute et. Ut proident laborum enim nulla proident velit tempor id occaecat eiusmod non. Tempor nostrud consequat est consequat velit nulla duis esse nulla est. Exercitation qui ullamco cupidatat non eiusmod eiusmod aute. Tempor amet ad excepteur id culpa sint culpa veniam.</p>'

document.querySelector('.main').insertAdjacentHTML('beforeend', dummyHTML)