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

              
                <h1>Sesame snaps donut</h1> 
<p>Sweet roll ice cream brownie fruitcake oat cake jelly beans dessert carrot cake dessert. Pie chocolate cake ice cream biscuit lemon drops wafer. Cookie dessert macaroon pie tart sweet roll. Cheesecake croissant pie apple pie tootsie roll. Toffee soufflé chocolate cake liquorice candy. Muffin ice cream pastry cupcake candy lollipop bear claw wafer gummies</p>
              
            
!

CSS

              
                :root {
  --colors: black, white; /* define your colors like an array */
  --i: 0; /* black text / white background */
  
  --_color:    color-mix(in hsl, var(--colors) calc(var(--i)*100%));
  --_bg-color: color-mix(in hsl, calc(var(--i)*100%) var(--colors));
}
@media (prefers-color-scheme: dark) {
  :root {
    --i: 1; /* white text / black background */
  }
}


body {
  color: var(--_color);
  background: var(--_bg-color);
  font-family: sans-serif;
  font-size: 1.5rem;
  padding-inline: 2rem;
}
              
            
!

JS

              
                
              
            
!
999px

Console