Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <main>
  <header>Header</header>
  <nav>Nav</nav>
  <section>Section</section>
  <aside>Aside</aside>
  <footer>Footer</footer>
</main>
              
            
!

CSS

              
                main {
  color: gainsboro;
  margin: 0 auto;
  max-width: 1000px;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 100%;
  grid-template-rows: 100px
    50px
    1fr
    100px
    200px;
  grid-template-areas: 
    "my-header my-header my-header"
    "my-nav my-nav my-nav"
    "my-section my-section my-section"
    "my-aside my-aside my-aside"
    "my-footer my-footer my-footer"
}

header {
  grid-area: my-header;
  background-color: blueviolet;
}

nav {
  grid-area: my-nav;
  background-color: cornflowerblue;
}

aside {
  grid-area: my-aside;
  background-color: darkmagenta;
}

section {
  grid-area: my-section;
  background-color: indigo;
}

footer {
  grid-area: my-footer;
  background-color: darkorchid;
}

@media (min-width: 600px) and (max-width: 1000px) {
  main {
    grid-template-columns: 200px 1fr 200px;
    grid-template-rows: 150px
      100px
      1fr
      100px;
    grid-template-areas: 
      "my-header my-header my-header"
      "my-nav my-nav my-nav"
      "my-aside my-section my-section"
      "my-footer my-footer my-footer"
  }
}

@media (min-width: 1001px) {
  main {
    grid-template-columns: 200px 1fr 200px;
    grid-template-rows: 200px
      1fr
      100px;
    grid-template-areas:
      "my-header my-header my-header"
      "my-nav my-section my-aside"
      "my-footer my-footer my-footer"
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console