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

              
                <h1>A big ’ol advertising tagline</h1>
<p class="intro">Tell me, O muse, of that ingenious hero who travelled far and wide after he had sacked the famous town of Troy. Many cities did he visit, and many were the nations with whose manners and customs he was acquainted; moreover he suffered much by sea while trying to save his own life and bring his men safely home; but do what he might he could not save his men, for they perished through their own sheer folly in eating the cattle of the Sun-god Hyperion; so the god prevented them from ever reaching home. </p>
<p>Many cities did he visit, and many were the nations with whose manners and customs he was acquainted; moreover he suffered much by sea while trying to save his own life and bring his men safely home; but do what he might he could not save his men, for they perished through their own sheer folly in eating the cattle of the Sun-god Hyperion; so the god prevented them from ever reaching home. Tell me, too, about all these things, O daughter of Jove, from whatsoever source you may know them.</p>
<div class="grid left">
  <div>
    <div class="fake-image"></div>
    <p class="">Tell me, O muse, of that ingenious hero who travelled far and wide after he had sacked the famous town of Troy. </p>
  </div>
  <div>
    <div class="fake-image"></div>
  <p>Many cities did he visit, and many were the nations with whose manners and customs he was acquainted</p>
  </div>
  <div>
    <div class="fake-image"></div>
  <p>Moreover he suffered much by sea while trying to save his own life and bring his men safely home</p>
  </div>
</div>

              
            
!

CSS

              
                body {
  /* set the default standard */
  font-size: 100%;
}
h1 {
  font-size: 3em;
  text-align: center;
}
p {
  font-family: Georgia, 'New Times Roman', serif;
  font-size: 1rem;
  line-height: 1.333;
  margin: 0 auto 1rem auto;
  max-width: 90vw;
}
@media screen and (min-width: 35em) {
  p {
    line-height: 1.4;
    max-width: 32em;
  }
}
@media screen and (min-width: 60em) {
  p {
    font-size: 1.125rem;
    line-height: 1.5;
    max-width: 40em;
  }
}
@media screen and (min-width: 75em) {
  p {
    font-size: 1.25rem;
  }
}
.intro {
  font-size: 1.25rem;
}
@media screen and (min-width: 60em) {
  .intro {
    font-size: 1.5rem;
  }
}
/* Alignment demo */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem,1fr));  grid-gap: 3rem;
  margin: 3rem auto 0;
  max-width: 50rem;
}
.fake-image {
  background-color: #e1e1e1;
  display: block;
  height: 10rem;
  margin-bottom: 1rem;
  width: 100%;
}

.grid p {
  padding-left: 1rem;
}
              
            
!

JS

              
                
              
            
!
999px

Console