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.


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.


                <h1>The box model with individual paddings and margins</h1>

<span class="padding-top bg-purple">
  Some content
<span class="pt20 pr20 pb pl b mt mr mb ml t c">
  Just some more additional content goes here

<div class="purpleBox"></div>



                .pt20, .padding-top { padding-top: 20px }
.pr20, .padding-right { padding-right: 20px }
.pb, .pb20, .padding-bottom { padding-bottom: 20px }
.pl, .pl20, .padding-left { padding-left: 20px }
.b, border { border: 3px solid gray }
.mt, .mt20, .margin-top { margin-top: 20px }
.mr, .mr20, .margin-right { margin-right: 20px }
.mb, .mb20, .margin-bottom { margin-bottom: 20px }
.ml, .ml20, .margin-left { margin-left: 20px }

.t, .tmt, .bg-purple { background: purple }

.c, .colr, .color-lightgray { color: lightgray }

span { display: inline-block }

.purpleBox {
  padding: 20px;
  margin: 20px;
  border: 3px solid gray;
  color: lightgray;
  background: purple

1. We can specify individual sizes for padding on top, right, bottom, left
2. We can specify individual sizes for margin-top, margin-right, margin-bottom, and margin-left
3. We can give as many names as we like to any number of CSS property-value pairs
4. A block element such as <div>, covers the full width of its parent even if that <div> doesn't hold any text