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 class="grid">
  <header>This is the header</header>
  <article>
    <div class="media">
  <div class="asset"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12005/harbour1.jpg" alt="hot air balloons"></div>
  <div class="content">
    <p>The first ascent, made in June from the Paris Observatory, though a lofty one, was attended with so much danger and confusion as to be barren of results. The departure, owing to stormy weather, was hurried and illordered, so that the velocity in rising was excessive, the net constricted the rapidly-swelling globe, and the volumes of out-rushing gas half-suffocated the voyagers. Then a large rent occurred, which caused an alarmingly rapid fall, and the two philosophers were reduced to the necessity of flinging away all they possessed, their instruments only excepted.</p>
    
  </div>
  
</div>
    <div class="media">
  <div class="asset"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12005/harbour1.jpg" alt="hot air balloons"></div>
  <div class="content">
    <p>The first ascent, made in June from the Paris Observatory, though a lofty one, was attended with so much danger and confusion as to be barren of results. The departure, owing to stormy weather, was hurried and illordered, so that the velocity in rising was excessive, the net constricted the rapidly-swelling globe, and the volumes of out-rushing gas half-suffocated the voyagers. Then a large rent occurred, which caused an alarmingly rapid fall, and the two philosophers were reduced to the necessity of flinging away all they possessed, their instruments only excepted.</p>
    
  </div>
  
</div>
    
  </article>
  <aside>This is an aside for some things</aside>
  <footer>Here is the footer</footer>
</main>
              
            
!

CSS

              
                html {
  font: 1.1em/1.4 Helvetica, sans-serif;
}

img {
  max-width: 100%;
  display: block;
}

p {
  margin: 0 0 1em 0;
}

* { box-sizing: border-box; }

.grid {
  display: grid;
  grid-gap: 1em;
  grid-template-columns: 1fr;
  border: 5px solid rgb(86,98,110);
  border-radius: 5px;
  padding: 10px;
}

.grid > * {
  border: 5px solid rgb(89,161,175);
  border-radius: 5px;
  padding: 10px;
}

@media (min-width: 40em) {
  .grid {
    grid-template-columns: 2fr 1fr;
  }
  
  header,
  footer {
    grid-column: 1 / 3;
  }
}

.media {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 2em;
}

.media > * {
  flex: 1 1 250px;
  margin: 10px;
}
              
            
!

JS

              
                
              
            
!
999px

Console