Pen Settings



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


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


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.


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.


                <strong>Best First-Person Shooters</strong>

<ol class="alternating-colors">
    <strong>Half-Life 2</strong>
    <p>Fight aliens, wear a head crab, learn about gravity</p>
    <strong>Halo: Combat Evolved</strong>
    <p>Fight aliens, wear an AI, learn about screen peeking siblings</p>
    <strong>Team Fortress 2</strong>
    <p>Fight non-alien residents, wear hats, learn about teamwork</p>
    <p>Ski, slip, and slide your way to victory</p>


                @import url(',wght@0,400;0,700;1,400;1,700&display=swap');

body { 
  font-family: 'Space Mono', monospace; 
  display: flex;
  flex-direction: column;
  max-width: 420px;
  padding: 32px;
  margin: 60px auto;
  border: 1px solid #eee;
  box-shadow: 0px 12px 24px rgba(0, 0, 0, 0.06);

* { // make it sexy
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizelegibility;
  letter-spacing: -0.25px;

ol { padding-left: 50px; }
li { 
  color: #4F4F4F; 
  padding-left: 16px;
  margin-top: 24px;
  position: relative;
  font-size: 16px;
  line-height: 20px;
  &:before {
    content: '';
    display: block;
    height: 42px;
    width: 42px;
    border-radius: 50%;
    border: 2px solid #ddd;
    position: absolute; // yeah, you have to manually position it based on the text size, line height, etc. (in the parent li style). it's not the smarest solution 
    top: -12px;
    left: -46px;

strong { color: #292929; }

ol.alternating-colors { 
  li:nth-child(odd):before { border-color: #0BAD02; }
  li:nth-child(even):before { border-color: #2378D5; }