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

              
                ul.ul1
  li Item 1
  li Item 2
  li Item 3
  li Item 4
  li Item 5
ul.ul2
  li Item 1
  li Item 2
  li Item 3
  li Item 4
  li Item 5
ul.ul3
  li Item 1
  li Item 2
  li Item 3
  li Item 4
  li Item 5
              
            
!

CSS

              
                // Adding padding to all list item elements
li {
  padding: .5rem;
}

// Styling different list item elements
.ul1 li {
  border: 1px solid salmon;
}

.ul2 li {
  border: 1px solid seagreen;
}

.ul3 li {
  border: 1px solid blueviolet;
}

// Adding margin bottom to all list item elements
.ul1 li {
  margin-bottom: 1rem;
}

// Disabling the margin bottom of the last item element
.ul1 li:last-child {
  margin-bottom: 0;
}

// Adding margin bottom to all list items except the last one
.ul2 li:not(:last-child) {
  margin-bottom: 1rem;
}

// Adding margin top to all list items that have the previous sibling
.ul3 li + li {
  margin-top: 1rem;
}


              
            
!

JS

              
                
              
            
!
999px

Console