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>Fixed-width design</h1>
<article>
  <p>If you specify a fixed width for your layout, then your layout will only look good at that specific width. If a visitor to your site has a screen that is wider than the width you have specified, then there’ll be wasted space on the screen. You can center the content of your pages to distribute that space more evenly (instead of having empty space on one side) but you still wouldn’t be taking full advantage of the available space.</p>
  <p>Similarly, if the visitor arrives with a screen that is narrower than the width you’ve chosen, then your content won’t fit horizontally. The browser generates a crawlbar—the horizontal equivalent of a scrollbar—and the user has to move the whole page left and right in order to see all of the content.</p>
</article>
              
            
!

CSS

              
                body {
  width: 640px;
  font-family: sans-serif;
  line-height: 1.5;
  padding: 0 16px;
}

h1 {
  margin-bottom: 0;
}

              
            
!

JS

              
                
              
            
!
999px

Console