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

              
                <div class="container">
  <h1>Main Container</h1>
  <nav>
    <ul>
      <li>First Item</li>
      <li>Second Item</li>
      <li>Third Item</li>
      <li>Fourth Item</li>
    </ul>
  </nav>
  <article>
    <h2>Article Title</h2>
    <p>
      Lorem ipsum dolor sit amet, <a href="http://codrops.com/">a link</a> consectetur adipisicing elit. Ratione, voluptate, voluptas nisi explicabo neque earum ab in est doloribus asperiores eligendi temporibus id <a href="#">another Link</a> distinctio quasi autem accusamus assumenda nesciunt facilis.
    </p>
    <p>
      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequatur, deleniti, doloribus quasi est adipisci vel a rerum tempore eius soluta dolores beatae voluptates eaque excepturi numquam alias velit. Aliquid, sapiente.
    </p>
  </article>

  <article>
    <h2>Article Title</h2>
    <p>
      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit, ad, odio, optio quo molestiae fuga aliquam repellat dolore quisquam maiores earum cum ducimus ut explicabo iste facere veniam magni eos.
    </p>
    <p>
      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Beatae, sed, cum quisquam in nesciunt repellendus maxime omnis harum deserunt illum suscipit asperiores commodi nobis? Aperiam officia odio accusantium voluptatum cupiditate!
    </p>
  </article>
</div>
              
            
!

CSS

              
                body {
  font-size: 1.2em;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

hr {
  margin: 50px 0;
}

.container {
  margin: 40px auto;
  max-width: 700px;
}

.element {
  padding: 20px;
}

article {
  padding: 1em;
  border: 1px solid #ddd;
  margin-bottom: 1em;
}

article:last-of-type {
  background-color: #eee;
  border: 1px solid #ddd;
}

li:last-of-type {
  text-decoration: underline;
}

p:last-of-type {
  font-weight: bold;
}

a{
  color: #a10000;
}

a:last-of-type {
  color: #a10000;
}

a[href]:last-of-type::after {
  content: "(" attr(href) ")";
  color: #a10000;
}
              
            
!

JS

              
                
              
            
!
999px

Console