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.


    When using the <code>onclick</code> handler to demonstrate, two of these activate when the space bar is pressed and one does not. Use the keyboard to tab to each one then hit the space bar.
    <a href="#" onclick="alert('foo');return false;" class="anchon">Foo</a>
    <button onclick="alert('bar');" class="anchon">Bar</button>
    <input type="submit" onclick="alert('wut');" value="Wut" class="anchon">
    One of these is an <code>&lt;a href="#"&gt;</code> styled to look like a button, another is a <code>&lt;button&gt;</code> and another is an <code>&lt;input type="submit"&gt;</code>. If you hold down the space bar or Enter key, you can also see when the event fires &#8212; when it is first pushed down or released.
    This pen is used as an example in the post <cite><a href="">Links, Buttons, Submits, and Divs, Oh Hell</a></cite>.



                body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.4;
  background-color: #fff;
  color: #000;
  /*   line-height: 1.5; */
  /*   letter-spacing: 0.12em; */
  /*   word-spacing: 0.16em; */

.anchon {
  box-sizing: border-box;
  display: inline-block;
  text-decoration: none;
  font-weight: bold;
  color: #000;
  cursor: pointer;
  padding: .5em 1em;
  background-color: #eee;
  background-image: linear-gradient( to bottom, #fff, #ccc);
  font-size: 100%;
  line-height: 1;
  border: .1em solid #333;
  margin-right: 1em;
  border-radius: .5em;

.anchon:hover, .anchon:focus {
  color: #fff;
  background-color: #666;
  background-image: linear-gradient( to bottom, #999, #333);
  outline: none;

.anchon:active {
  outline: none;
  box-shadow: .1em .1em 0 #000, -.1em -.1em 0 #000, -.1em .1em 0 #000, .1em -.1em 0 #000, 0 0 .5em #f00;
  border-color: #fff;