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

              
                <!-- Emmet Code: 
doc>header>h1{Website Title}+nav>a{Link $}*3^^hr+aside#sidebar>h2{Sidebar Title}+p>Lorem^^main#blog>article.post(h1{Post Title $}+div.post-body(p*2>Lorem))*3
-->
<html>

<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>

<body>
  <header>
    <h1>Website Title</h1>
    <nav>
      <a href="">Link 1</a></li>
      <a href="">Link 2</a></li>
      <a href="">Link 3</a></li>
    </nav>
  </header>
  <hr>
  <aside id="sidebar">
    <h2>Sidebar Title</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Molestiae deleniti tempore aliquam repudiandae est accusantium iste error! Facilis, sunt soluta totam eum! Laudantium pariatur minus ipsam quibusdam, quod saepe iure?</p>
  </aside>
  <main id="blog">
    <article class="post">
      <h1>Post Title 1</h1>
      <div class="post-body">
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cum tempora, excepturi, laboriosam eligendi eveniet similique quod, saepe veniam id ducimus expedita vitae! Eius mollitia, earum molestias vero, numquam vel maxime.</p>
        <p>Molestias, tenetur voluptate fugit, rerum optio id corporis eum, inventore asperiores deleniti aliquam qui voluptates, ipsam debitis reprehenderit! Molestiae atque possimus adipisci, itaque deserunt non obcaecati autem ipsam numquam commodi!</p>
      </div>
    </article>
    <article class="post">
      <h1>Post Title 2</h1>
      <div class="post-body">
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Porro, qui iste quisquam officiis obcaecati perferendis nam a expedita molestias ex dolores id laudantium, eius assumenda commodi suscipit, nisi quam. Nesciunt.</p>
        <p>Pariatur, voluptatem dolor, quae aut eaque tempore mollitia quis in odit quaerat explicabo neque, dignissimos ullam iste tenetur commodi reiciendis numquam, necessitatibus! Suscipit recusandae id repellat, veritatis qui voluptate nobis.</p>
      </div>
    </article>
    <article class="post">
      <h1>Post Title 3</h1>
      <div class="post-body">
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Numquam eaque tenetur necessitatibus consequuntur, sed earum totam in laudantium nihil ab provident quas pariatur aliquam dolorem fugit. Odio ratione, aperiam dicta.</p>
        <p>Quasi ipsum alias quis, maxime vero, eligendi possimus ex cum incidunt fuga neque dolorum ad atque accusantium beatae architecto earum quaerat, soluta culpa quibusdam. Voluptas ullam maxime quos recusandae pariatur.</p>
      </div>
    </article>
  </main>
</body>

</html>
              
            
!

CSS

              
                body {
  line-height: 1.5;
}

aside h2, aside p {
  padding: 0 5%;
  margin-top: 30px;
}
aside h2,
header h1, 
nav {
  text-align: center;
}
header h1 { font-size: 250%; }
/* Helps with accessibility. */
nav {
  font-size: 0;
  margin-top: -20px;
}
nav a {
  font-size: 18px;
  background: #ddd;
  padding: 5px;
  margin: 0 5px;
}
main,
header {
  max-width: 500px;
  margin: 0 auto;
}

/* For screens smaller than 600 pixels wide. */
@media only screen and (max-width: 599.9px) {
  aside {
    display: none;
  }
  main,
  header {
    margin: 0 40px;
  }
}

/* For screens larger than 600 pixels wide. */
@media only screen and (min-width: 600px) {
  aside {
    position: fixed;
    width: 230px;
    height: 100%;
    top: 0;
    left: 0;
    background: #eee;
  }
  main,
  header {
    max-width: 500px;
    padding-left: 240px;
    margin: 0 auto;
  }
}

/* Demonstrating the debugging hack. */
/* * {
  background: #000!important;
  color: #0f0!important;
  outline: solid #f00 1px!important;
} */

/* Demonstrating the box model hack. */
html {
  box-sizing: border-box;
}
*,
*:before,
*:after {
}

              
            
!

JS

              
                
              
            
!
999px

Console