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

              
                <h2>Default</h2>
<p>
  <strong>(`display: block; color: red; padding: 0;`)</strong> 
  Lorem ipsum dolor sit amet consectetur adipisicing elit. Nisi, amet officiis. Quam accusantium voluptates nobis commodi eos, ducimus iste harum quos illum? Accusantium beatae dignissimos adipisci eos in maiores iusto!
</p>
<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Repellendus nobis, vero odit, maxime possimus repudiandae cum aperiam facere provident vel nesciunt qui quidem iusto. Quibusdam illo impedit odio vero et.</p>

<h2>Inherit</h2>
<p class="inherit">
  <strong>`Inherit` uses the same value as the parent element (`display: block; color: red; padding: 2em;`)</strong>
  Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus ex cupiditate consequatur, in voluptates debitis dolor placeat quis fugit, perferendis provident necessitatibus ad veniam quia dignissimos ut, esse eveniet commodi?
</p>
<p class="inherit">
  Lorem ipsum dolor sit, amet consectetur adipisicing elit. Dolorum corrupti eum laborum fugiat, perferendis sed ullam animi consequuntur placeat, incidunt tempora officiis reiciendis vel distinctio voluptas eaque mollitia reprehenderit aut!
</p>

<h2>Initial</h2>
<p class="initial">
  <strong>`Initial` resets all properties to their spec default (`display: inline; color: black; padding: 0;`)</strong>
  Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus ex cupiditate consequatur, in voluptates debitis dolor placeat quis fugit, perferendis provident necessitatibus ad veniam quia dignissimos ut, esse eveniet commodi?
</p>
<p class="initial">
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perspiciatis, reiciendis aperiam quis voluptas magni culpa? Facere quae vel dolore deleniti delectus labore unde autem sunt suscipit aut. Officiis, iusto corrupti.
</p>

<h2>Unset</h2>
<p class="unset">
  <strong>`Unset` allows default inheritance (color, but not padding), then falls back on the `initial` value (`display: inline; color: red; padding: 0;`)</strong>
  Lorem ipsum dolor sit amet consectetur, adipisicing elit. Eaque exercitationem cum vitae aperiam quod adipisci, distinctio ullam dicta ad veritatis quibusdam animi sunt, laboriosam et placeat, quam enim neque maxime.
</p>
<p>
  Lorem ipsum dolor sit amet consectetur adipisicing elit. Excepturi in hic temporibus autem tempore, nulla similique rerum adipisci, alias ea laborum, fuga sed unde atque molestiae necessitatibus officia maxime magnam!
</p>

<h2>Revert</h2>
<p class="revert">
  <strong>`Revert` allows default inheritance (color, but not padding), then falls back on user/user-agent values (`display: block; color: red; padding: 0;`)</strong>
  Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quia, laboriosam, omnis ad explicabo optio ipsum ipsam ut temporibus magnam officiis minus rem, quisquam soluta quibusdam enim quidem dolore quod. Eius!
</p>
<p>
  Lorem ipsum dolor sit amet consectetur adipisicing elit. Laboriosam, adipisci quae molestias saepe officia odit corrupti maiores impedit accusamus placeat reprehenderit. Alias, laborum! Consequatur itaque illum dignissimos repellendus ut recusandae.
</p>
              
            
!

CSS

              
                body {
  background: white;
  color: rebeccapurple;
  padding: 2em;
}

/* visualization help */
p { outline: 1px dotted blue; }

.inherit {
  display: inherit;
  color: inherit;
  padding: inherit;
}

.initial {
  display: initial;
  color: initial;
  padding: initial;
}

.unset {
  display: unset;
  color: unset;
  padding: unset;
}

.revert {
  display: revert;
  color: revert;
  padding: revert;
}






/* style */
body {
  margin: 1em auto;
  max-width: 45em;
}
              
            
!

JS

              
                
              
            
!
999px

Console