Pen Settings



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


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.


<!-- Margin is always outside -->

  CSS box model. Padding and border always increases size of box. Always
  The only thing that changes with box-sizing is the width.
  We take away from the width the padding and boder in the border-box model.

  border-box is the most commonly used as it's easier to layout elements

<!-- box size is always going to be 100px total: 
width = 100px - Padding - Border.
Then add padding and border as normal -->
<div class="border-box">
  width - padding - border

<!-- The size of the box is 100px + padding + border -->
<div class="content-box">
  width + padding + border



                .border-box {
  box-sizing: border-box;

.content-box {
  box-sizing: content-box;

div {
  background: #03A9F4;
  width: 100px;
  height: 100px;
  padding: 5px;
  margin: 20px;
  border: 5px solid #76daff;