Pen Settings

HTML

CSS

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

HTML

              
                <p class="box1">This paragraph has a span <span class="ib">with padding</span> and has inline flow-root. Therefore the padding will push away other lines of text.</p>

<div class="box box2">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12005/balloon-sq1.jpg" alt=""> The image has been floated to the left. This box does have display: flow-root.
</div>
<p>This paragraph follows the box which contains the float.</p>
              
            
!

CSS

              
                span {
  background-color: rgba(0,0,0,.4);
  color: #fff;
  padding: 10px;
  display: inline flow-root;
}

.box {
  clear: left;
  background-color: #333;
  color: #fff;
  max-width: 500px;
  margin: 0 0 2em 0;
  padding: 1em;
  display: block flow-root;
}

p {
  margin: 2em 0;
  width: 400px;
}

.box img {
  float: left;
  width: 150px;
  margin: 0 10px 10px 0;
}

body {
  padding: 1em;
  font: 1.2em/1.4 Arial, Helvetica, sans-serif;
}
              
            
!

JS

              
                
              
            
!
999px

Console