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>
  <h1>Large Headline Title Goes Here</h1>
  <h2 class="subhead">Subhead ipsum dolor sit amet</h2>
  <p class="meta"><span class="label">LABEL:</span> Item Description</p>
  <p class="meta"><span class="label">LABEL:</span> Another Item</p>
  <h3>Section Header</h3>
  <p>Body Copy lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque semper
    justo pulvinar, pharetra arcu eget, maximus ante. Cras condimentum cursus ligula,
    vel commodo urna ornare eget. Phasellus interdum justo velit. In id scelerisque felis,
    non sollicitudin neque. Mauris sit amet neque non nisi suscipit laoreet eget quis
    lacus. In hac habitasse platea dictumst. Nulla facilisi. Aliquam lorem lacus, molestie
    at odio ut, tempus volutpat urna. Aliquam sit amet ornare sapien. In sed odio nec
    enim pretium consectetur in sit amet velit. Nulla bibendum tincidunt rhoncus.</p>
  <h3>Section Header</h3>
  <p>Nullam finibus dui et ullamcorper facilisis. Pellentesque sed turpis eu elit sollicitudin
    pulvinar. Praesent at molestie ipsum. Morbi sagittis, massa id consectetur ultrices,
    mi felis pellentesque nisl, volutpat egestas ante odio ut mauris. Lorem ipsum dolor
    sit amet, consectetur adipiscing elit. Sed ac lacus ut leo gravida vehicula nec id orci.
    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis

    egestas. Cras imperdiet rhoncus leo sit amet dictum. Nullam pretium congue biben-
    dum. Maecenas porttitor non lacus a eleifend.</p>
</div>


              
            
!

CSS

              
                html, body {
  height: 100%;
}

body {
  background: #ccc;
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: 100%;
  line-height: 1.4;
  line-height: calc(1.2em + (1.4 - 1.2) * ((100vw - 300px) / 100));
  color: #333;
}

div {
  box-sizing: content-box;
  max-width: 800px;
  background: #fff;
  padding: 10%;
  margin: 5% auto;
}

h1 {
  color: #f90;
  font-family: 'Libre Baskerville', serif;
  font-weight: 500;
  font-style: normal;
  font-size: 4.5em;
  /* calc([minimum size] + ([maximum size] - [minimum size]) * ((100vw - [minimum viewport width]) / ([maximum viewport width] - [minimum viewport width]))); */
  font-size: calc(2.5em + (4.5 - 2.5) * ((100vw - 300px) / 100));
  line-height: 1.2;
  margin: 0;
}

h2.subhead {
  color: #999;
  font-weight: 300;
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5em;
  font-size: calc(1.5em + (2.5 - 1.5) * ((100vw - 300px) / 100));
  line-height: 1.1em;
  margin: .5em 0;
}

.meta {
  font-size: .875em;
  margin: .5em 0;
  font-weight: 500;
}

.meta .label {
  color: #999;
  font-weight: 400;
}

h3 {
  line-height: 1.3em;
  margin: 1.5em 0 0 0;
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: .08em;
}

h3+p {
  margin-top: .5em;
}


              
            
!

JS

              
                
              
            
!
999px

Console