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

              
                header#header.header
  .header-inner.max-700
    h1.logo Logo
    nav.main-nav
      ul.nav-menu
        li Item 1
        li Item 2
        li Item 3
        
        
section#hero.hero
  .hero-inner.max-500
    h1 Some Headline Goes Here
    p The Nellie, a cruising yawl, swung to her anchor without a flutter of the sails, and was at rest. The flood had made, the wind was nearly calm, and being bound down the river, the only thing for it was to come to and wait for the turn of the tide.
    button Click Me
    
    
section#section.section
  .section-inner.max-700
    .section-image
      img(src="https://source.unsplash.com/800x800/?texture")
    .section-text
      h1 Some Headline Goes Here
      p The Nellie, a cruising yawl, swung to her anchor without a flutter of the sails, and was at rest. The flood had made, the wind was nearly calm, and being bound down the river, the only thing for it was to come to and wait for the turn of the tide.
      button Click Me
              
            
!

CSS

              
                img
  width: 100%
  
.max-500
  max-width: 500px
  margin: 0 auto
  
.max-700
  max-width: 700px
  margin: 0 auto
  
.header
  background:
    color: #ddd
    
.header-inner
  display: flex
  justify-content: space-between
  align-items: center
  padding: 1rem
  
.logo
  margin: 0
  padding: 0
  
.nav-menu
  list-style: none
  padding: 0
  margin: 0
  display: flex
  
  li
    margin-left: 1rem
    
    
.hero
  background:
    image: url(https://source.unsplash.com/1600x900/?person)
    size: cover
    position: center
    repeat: no-repeat
  height: 50vh
  color: white
  display: flex
  justify-content: center
  align-items: center
  
.hero-inner
  text-align: center
  
  
.section
  background:
    color: pink
  padding: 3rem 0
  
  @media (min-width: 500px)
    display: flex
    
.section-inner  
  @media (min-width: 500px)
    display: flex
    
.section-text
  padding: 0 0 0 1.5rem
  
  h1
    margin: 0
              
            
!

JS

              
                
              
            
!
999px

Console