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>Box Model</h1>
<p>Every element on the page has its own box, which can be styled using CSS.</p>
<p>From the inside out:</p>

<p>Keep in mind that a <code>background</code> will cover the content and the padding.</p>

  <li>Give the <code>h1</code> a red background, some padding, and a black border.</li>
  <li>Give every <code>p</code> a blue background, white text, some padding, and a black border.</li>
  <li>Give every <code>code</code> element a white background, black text, a little padding, and a thin border.</li>

<h2>Now You Try</h2>
  <li>Try adding styles for the <code>h2</code>s, <code>ol</code>s, and <code>li</code>s on this page.</li>
  <li>Look into the syntax for <code>margin</code> and try adding more space around elements by using them.</li>


                body {
  font-family: sans-serif;
  line-height: 1.5;

h1 {
  background: red;
  padding: 30px;
  border: 5px solid black;

p {
  color: white;
  background: blue;
  padding: 15px;
  border: 2px solid black;

code {
  color: black;
  background: white;
  padding: 2px 5px;
  border: 2px solid black;