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 class="header">
  <nav class="nav flex">
    <h1 class="flex-item home"><a href="#">typo~typo</a></h1>
    <a href="#" class="flex-item">Helvetica</a>
    <a href="#" class="flex-item">Times New Roman</a>
    <a href="#" class="flex-item">Garamond</a>
    <a href="#" class="flex-item">Didot</a>
    <a href="#" class="flex-item">Franklin Gothic</a>
  </nav>
</header>
<div class="main">
  <h1>Helvetica</h1>
  <p>Helvetica est une police de caractères linéale sans empattement (en anglais, sans serif) créée en 1957 par Max Miedinger qui l'a dessinée dans un objectif précis : atteindre l'harmonie optique la plus aboutie possible. Symbole de la typographie suisse,
    cette police d'une grande lisibilité avec son tracé d'une grande neutralité lui permet de se prêter à tous les usages, si bien qu'elle demeure une des polices les plus utilisées dans le monde et jouit de la faveur des graphistes et typographes.</p>
  

 

</div>
<footer class="footer">
  <nav class="footer-nav flex">
    <a href="#" class="flex-item">facebook</a>
    <a href="#" class="flex-item">twitter</a>
    <a href="#" class="flex-item">linkedin</a>
  </nav>
</footer>
              
            
!

CSS

              
                *{
    box-sizing:border-box;
}

body{
  display:flex;
  min-height:100vh;
  flex-direction:column;
  margin:0;
  padding:0;
  font-family:sans-serif;
  font-size:18px;
  line-height:1.5;
  color:#fff;
  background:#06f;
}

.header,
.footer{
  background:#fff;
  color:#06f;
}

.nav,
.footer-nav,
.main{
  max-width:1200px;
  margin:0 auto;
}

.main{
  flex:1;
  padding:25px;

}

.flex{
  display:flex;
}

.footer-nav.flex{
  justify-content:center;  
}

.flex-item{
  padding:12px;
}

.flex-item.home{
  margin:0 auto 0 0;
  font-size:1em;
  border-bottom:5px solid #06f;
}

.flex-item.home a{
  border:none;
}

a{
  color:#06f;
  text-decoration:none;
  display:block;
  border-bottom:5px solid #fff;
}

a:hover{
  border-bottom:5px solid #06f;
  transition:border-color 400ms ease-out;
}

p{
  max-width:35em;
}
              
            
!

JS

              
                
              
            
!
999px

Console