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

              
                <h1>Google Fonts</h1>

<section class="gallery">
  <div class="cell">
    <span class="amp amp--alegreya">&amp;</span>
    <p>Alegreya SC</p>
  </div>
  <div class="cell">
    <span class="amp amp--alice">&amp;</span>
    <p>Alice</p>
  </div>
  <div class="cell">
    <span class="amp amp--cardo">&amp;</span>
    <p>Cardo (Italic)</p>
  </div>
  <div class="cell">
    <span class="amp amp--crimson">&amp;</span>
    <p>Crimson Text (Italic)</p>
  </div>
  <div class="cell">
    <span class="amp amp--goudy--bookletter">&amp;</span>
    <p>Goudy Bookletter 1911</p>
  </div>
  <div class="cell">
    <span class="amp amp--french">&amp;</span>
    <p>IM Fell French Canon (Italic)</p>
  </div>
  <div class="cell">
    <span class="amp amp--baskerville--libre">&amp;</span>
    <p>Libre Baskerville (Italic)</p>
  </div>
  <div class="cell">
    <span class="amp amp--linden">&amp;</span>
    <p>Linden Hill</p>
  </div>
  <div class="cell">
    <span class="amp amp--linden--i">&amp;</span>
    <p>Linden Hill (Italic)</p>
  </div>
  <div class="cell">
    <span class="amp amp--niconne">&amp;</span>
    <p>Niconne</p>
  </div>
  <div class="cell">
    <span class="amp amp--overlock">&amp;</span>
    <p>Overlock (Italic)</p>
  </div>
  <div class="cell">
    <span class="amp amp--ovo">&amp;</span>
    <p>Ovo</p>
  </div>
  <div class="cell">
    <span class="amp amp--petit">&amp;</span>
    <p>Petit Formal Script</p>
  </div>
  <div class="cell">
    <span class="amp amp--playfair">&amp;</span>
    <p>Playfair Display</p>
  </div>
  <div class="cell">
    <span class="amp amp--radley">&amp;</span>
    <p>Radley (Italic)</p>
  </div>
  <div class="cell">
    <span class="amp amp--rochester">&amp;</span>
    <p>Rochester</p>
  </div>
  <div class="cell">
    <span class="amp amp--goudy--sorts">&amp;</span>
    <p>Sorts Mill Goudy</p>
  </div>
  <div class="cell">
    <span class="amp amp--goudy--sorts--i">&amp;</span>
    <p>Sorts Mill Goudy (Italic)</p>
  </div>
  <div class="cell">
    <span class="amp amp--volkhov">&amp;</span>
    <p>Volkhov (Italic)</p>
  </div>
</section>

<h1>Mac OS X</h1>

<section class="gallery">
  <div class="cell">
    <span class="amp amp--andale">&amp;</span>
    <p>Andale Mono</p>
  </div>
  <div class="cell">
    <span class="amp amp--athelas">&amp;</span>
    <p>Athelas (Italic)</p>
  </div>
  <div class="cell">
    <span class="amp amp--baskerville">&amp;</span>
    <p>Baskerville (Italic)</p>
  </div>
  <div class="cell">
    <span class="amp amp--chancery">&amp;</span>
    <p>Apple Chancery (Italic)</p>
  </div>
  <div class="cell">
    <span class="amp amp--cochin">&amp;</span>
    <p>Cochin (Italic)</p>
  </div>
  <div class="cell">
    <span class="amp amp--didot">&amp;</span>
    <p>Didot (Italic)</p>
  </div>
  <div class="cell">
    <span class="amp amp--herculanum">&amp;</span>
    <p>Herculanum</p>
  </div>
  <div class="cell">
    <span class="amp amp--hoefler">&amp;</span>
    <p>Hoefler Text (Italic)</p>
  </div>
  <div class="cell">
    <span class="amp amp--palatino">&amp;</span>
    <p>Palatino (Italic)</p>
  </div>
  <div class="cell">
    <span class="amp amp--plantagenet">&amp;</span>
    <p>Plantagenet Cherokee</p>
  </div>
  <div class="cell">
    <span class="amp amp--symbol">&amp;</span>
    <p>Symbol</p>
  </div>
  <div class="cell">
    <span class="amp amp--zapfino">&amp;</span>
    <p>Zapfino</p>
  </div>
</section>

<p>On Windows 7, only Palatino and Plantagenet Cherokee display using the correct font.</p>
              
            
!

CSS

              
                @import compass

@import url(https://fonts.googleapis.com/css?family=Overlock:400italic|Playfair+Display|Sorts+Mill+Goudy:400italic|Niconne|Petit+Formal+Script|IM+Fell+French+Canon:400italic|Ovo|Libre+Baskerville:400italic|Alegreya+SC|Alice|Cardo:400italic|Crimson+Text:400italic|Goudy+Bookletter+1911|Linden+Hill:400,400italic|Radley:400italic|Rochester|Volkhov:400italic&text=%26)

*, *::before, *::after
  box-sizing: border-box

html
  font-size: percentage(18px/16px)

body
  background-color: #d6d5d5
  color: #222
  font-family: "athelas", georgia, serif
  line-height: 1.5
  min-width: 30em
  padding: 1em
  
h1, h2, h3, h4, h5, h6
  color: #333
  margin-top: 0
  margin-bottom: 1.5rem
  
p
  clear: both
  margin-top: 0
  margin-bottom: 1.5rem
    
.group
  &::after
    clear: both
    content: ""
    display: table
    
.gallery
  @extend .group
  margin-bottom: 1.5rem
  
.cell
  float: left
  text-align: center
  padding: 0 0.75rem
  width: percentage(1/4)
  &:nth-of-type(4n+1)
    clear: left
  
.amp
  font-size: 3em


// Google Fonts
//========================================

.amp--alegreya
  font-family: "Alegreya SC"
  font-style: normal
    
.amp--alice
  font-family: "Alice"
  font-style: normal
  
.amp--cardo
  font-family: "Cardo"
  font-style: italic
  
.amp--crimson
  font-family: "Crimson Text"
  font-style: italic
  
.amp--goudy--bookletter
  font-family: "Goudy Bookletter 1911"
  font-style: normal
  
.amp--french
  font-family: "IM Fell French Canon"
  font-style: italic
  
.amp--baskerville--libre
  font-family: "Libre Baskerville"
  font-style: italic
    
.amp--linden
  font-family: "Linden Hill"
  font-style: normal
    
.amp--linden--i
  font-family: "Linden Hill"
  font-style: italic
  
.amp--niconne
  font-family: "Niconne"
  font-style: normal
  
.amp--overlock
  font-family: "Overlock"
  font-style: italic

.amp--ovo
  font-family: "Ovo"
  font-style: normal
    
.amp--petit
  font-family: "Petit Formal Script"
  font-style: normal

.amp--playfair
  font-family: "Playfair Display"
  font-style: normal
    
.amp--radley
  font-family: "Radley"
  font-style: italic

.amp--rochester
  font-family: "Rochester"
  font-style: normal
  
.amp--goudy--sorts
  font-family: "Sorts Mill Goudy"
  font-style: normal
    
.amp--goudy--sorts--i
  font-family: "Sorts Mill Goudy"
  font-style: italic
  
.amp--volkhov
  font-family: "Volkhov"
  font-style: italic


// Mac OS X
//========================================

.amp--andale
  font-family: "andale mono"
  font-style: normal
    
.amp--athelas
  font-family: "athelas"
  font-style: italic
  
.amp--baskerville
  font-family: "baskerville"
  font-style: italic
  
.amp--chancery
  font-family: "apple chancery"
  font-style: italic
  
.amp--cochin
  font-family: "cochin"
  font-style: italic
  
.amp--didot
  font-family: "didot"
  font-style: italic
  
.amp--herculanum
  font-family: "herculanum"
  font-style: normal
    
.amp--hoefler
  font-family: "hoefler text"
  font-style: italic
  
.amp--palatino
  font-family: "palatino", "palatino linotype"
  font-style: italic
  
.amp--plantagenet
  font-family: "plantagenet cherokee"
  font-style: normal

.amp--symbol
  font-family: "symbol"
  font-style: normal
    
.amp--zapfino
  font-family: "zapfino"
              
            
!

JS

              
                
              
            
!
999px

Console