Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's 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 it's URL and the proper URL extention.

+ 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

Save Automatically?

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>Is This Set In New York?</h1>
<p>It depends on which browser you are using.</p>

<p>Safari renders it as New York:</p>

<img src="https://cdn.jim-nielsen.com/ny-safari.png" width="387" height="46" alt="Screenshot of a heading set in the New York typeface in Safari." />

<p>Whereas Chrome (and Firefox) render it as Georgia:</p>

<img src="https://cdn.jim-nielsen.com/ny-chrome.png" width="416" height="40" alt="Screenshot of a heading set in the Georgia typeface in Chrome." />

<p>At the time of writing this codepen, <a href="https://caniuse.com/extended-system-fonts" target="_blank">support</a> for <code>ui-serif</code> is supposedly only in Safari, but <code>@supports</code> seems to trigger for it in Chrome (and Firefox) even though it doesn't set the right typeface.</p>
              
            
!

CSS

              
                h1 {
  font-family: ui-serif, "Georgia", serif;
}

@supports (font-family: ui-serif) {
  body {
    background: rgb(255 0 0 / 10%);
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console