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

              
                <header role="banner">
  <h1>Site Title</h1>
  <nav role="navigation" class="navbar">
    <a href="#">Link</a>
    <a href="#">Link</a>
    <a href="#">Link</a>
    <a href="#">Link</a>
  </nav>
</header>

<!--
content by [Batman Ipsum](http://idsgn.dropmark.com/107/1460961)
-->

<main role="main">
  <h1>Page Title</h1>
  <P>I thought this might be a good opportunity for... improving the foundations.</p>
  <p>You are in hell, little man. And I am the devil.</p>
  <p>Now, our operation is small but there is a lot of potential for aggressive expansion. So which of you fine gentlemen would like to join our team? Oh. There's only one spot open right now, so we're gonna have... tryouts.</p>
</main>

<aside role="complementary">
  <h2>Sidebar</h2>
  <p>Yes. The fire rises.</p>
  <p>You must become more than just a man in the mind of you opponent.</p>
  <p>You want order in Gotham. Batman must take off his mask and turn himself in. Oh, and every day he doesn't, people will die. Starting tonight. I'm a man of my word.<P>
</aside>
    
<footer role="contentinfo">
  <small>I am the League of Shadows.</small>
</footer>
              
            
!

CSS

              
                html { box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }

header, main, aside, footer {
  padding: 1rem;
}

header[role="banner"] {
  text-align: center;
}

.navbar a {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  width: 7em;
  border-right: 1px solid red;
}

.navbar a:last-of-type {
  border-right: none;
}

/* 
  demonstration:
  display: table makes responsiveness easy!
*/
@media (min-width: 40em) {

  main, aside {
    display: table-cell;
  }

  main {
    width: 70%;
  }

}
              
            
!

JS

              
                
              
            
!
999px

Console