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>Main heading</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae architecto error voluptas?</p>
<h2>Secondary heading</h2>
<p>Vitae eaque minus enim porro assumenda, culpa corrupti laudantium excepturi voluptas, possimus nobis eius, omnis quasi odio ex.</p>
<h3>Helper heading</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae architecto error voluptas?</p>
<h3>Helper heading</h3>
<p>Vitae eaque minus enim porro assumenda, culpa corrupti laudantium excepturi voluptas, possimus nobis eius, omnis quasi odio ex.</p>
<h3>Helper heading</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae architecto error voluptas?</p>
<h2>Secondary heading</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae architecto error voluptas? Vitae eaque minus enim porro assumenda, culpa corrupti laudantium excepturi voluptas, possimus nobis eius, omnis quasi odio ex.</p>
<h3>Helper heading</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae architecto error voluptas? Vitae eaque minus enim porro assumenda, culpa corrupti laudantium excepturi voluptas, possimus nobis eius, omnis quasi odio ex.</p>
<h3>Helper heading</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae architecto error voluptas? Vitae eaque minus enim porro assumenda, culpa corrupti laudantium excepturi voluptas, possimus nobis eius, omnis quasi odio ex.</p>
<h2>Secondary heading</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae architecto error voluptas? Vitae eaque minus enim porro assumenda, culpa corrupti laudantium excepturi voluptas, possimus nobis eius, omnis quasi odio ex.</p>
<h3>Helper heading</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae architecto error voluptas? Vitae eaque minus enim porro assumenda, culpa corrupti laudantium excepturi voluptas, possimus nobis eius, omnis quasi odio ex.</p>
<h2>Secondary heading</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae architecto error voluptas? Vitae eaque minus enim porro assumenda, culpa corrupti laudantium excepturi voluptas, possimus nobis eius, omnis quasi odio ex.</p>
<h3>Helper heading</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae architecto error voluptas? Vitae eaque minus enim porro assumenda, culpa corrupti laudantium excepturi voluptas, possimus nobis eius, omnis quasi odio ex.</p>
<h3>Helper heading</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae architecto error voluptas? Vitae eaque minus enim porro assumenda, culpa corrupti laudantium excepturi voluptas, possimus nobis eius, omnis quasi odio ex.</p>
<h2 class="non-numbered">Non numbered heading</h2>
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Eius ipsam ullam impedit odit, quia magni amet consectetur, reprehenderit delectus, voluptates corrupti saepe suscipit dolor repellendus sunt sapiente vel quo esse.</p>
              
            
!

CSS

              
                html {
  margin: 10px 20px;
  line-height: 1.2;
  font-size: 17px;
}

body {
  counter-reset: headings2;
}

h2 {
  counter-reset: headings3;
}

h2:before {
  content: counter(headings2) ". ";
  counter-increment: headings2;
}

h3:before {
  content: counter(headings2) "." counter(headings3) ". ";
  counter-increment: headings3;
}

.non-numbered:before {
  content: none;
  counter-increment: none;
}
              
            
!

JS

              
                
              
            
!
999px

Console