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.


                <header><h1>Site Title</h1>
  <button>Header Button</button>
  <button>Header Button</button>
    <a href="#">Header link</a>
    <a href="#">Header link</a>
    <a href="#">Header link</a>
  <p>Donec id elit non mi porta <a href="#">gravida</a> at eget metus. Fusce, fermentum massa amet. <a href="#">Etiam porta</a> sem malesuada magna mollis euismod. <a href="#">Donec</a> sed odio dui.</p>
  <button>Content Button</button>
  <button>Content Button</button>


                :root {
  --primaryColor: hsl(165, 60%, 40%);

a {
  color: var(--linkColor, var(--primaryColor));

button {  
  background: var(--Button-backgroundColor, var(--primaryColor));
  border: 1px solid var(--Button-borderColor, var(--primaryColor));
  border-radius: .5em;
  color: var(--Button-color, white);
  font-size: .9em;
  padding: .75em 2em;
  text-align: center;

header {
  --Button-backgroundColor: transparent;
  --Button-borderColor: currentColor;
  --Button-color: currentColor;
  --linkColor: currentColor;  
  background: #333;
  color: #fff;

/* The styles below aren't relevant to the demo. */

body {
  color: #333;
  font: 1em/1.25 'Helvetica Neue', sans-serif;
  text-align: center;

main {
  padding: 2em;

h1 {
  font-size: 4em;
  font-weight: 400;
  margin: 0 0 .25em;

p {
  max-width: 36em;
  margin: 0 auto 1em;

nav > a {
  display: inline-block;
  margin: .75em;


                function supportsCSSCustomProperties() {
  var div = document.createElement('div');'--width', '1%');
  return'--width') == '1%';

if (!supportsCSSCustomProperties()) {
  alert('Sorry! Your browser does not support CSS Custom Properties.');