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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <html>
  <head>
    <link rel="stylesheet" type="text/css" href="style.css">
  </head>
  <body>
    <header>
      <p>
        This document contains examples of how to
      use different <span id="subject">HTML elements</span>.
      </p>
        Table of Contents:
        <ol>
          <li>
            <a href="#headingsAndParagraphs">Headings and Paragraphs</a>
          </li>
          <li>
            <a href="#lists">Lists</a>
          </li>
          <li>
            <a href="#links">Links</a>
          </li>
        </ol>
    </header>
    <div id="headingsAndParagraphs">
      <h1>This is a level 1 heading!</h1>
      <p id="firstParagraph" class="paragraph first">
        This is a paragraph
      </p>
      <p id="secondParagraph" class="paragraph second">
        Inside this paragraph
        are words in <strong>Bold</strong>
        and others that have <em>emphasis</em>.
      </p>
    </div>
    <div id="lists">
      <ol>
        <li>The first item</li>
        <li>The second item.</li>
        <li>The third item.</li>
      </ol>
      <ul>
        <li>The first item</li>
        <li>The second item.</li>
        <li>The third item.</li>
      </ul>
    </div>
    <div id="links">
      <p>
        <a href="https://www.google.com/">Google</a>
      </p>
      <p>
        <a href="./page.html">A resource in the same directory</a>
      </p>
      <p>
        <a href="../page.html">A resource in one directory above</a>
      </p>
      <p>
        <a href="../../page.html">A resource in two directories above</a>
      </p>
    </div>
  </body>
</html>

              
            
!

CSS

              
                /* This is a CSS document */
p {
  color: green;
}
#headingsAndParagraphs {
  color: yellow;
}
.first {
  color: purple;
}
p.second {
  color: blue;
}
a,p {
  color: red;
}
[id='subject'] {
  color: orange;
}
a[href^="https"] {
  color: pink;
}
html {
  background: hsla(0, 100%, 90%, 1);
  color: black;
}
              
            
!

JS

              
                
              
            
!
999px

Console