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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

              
                <div class="wrapper">
  <a class="skip-link" href="#content">Skip to content</a>
  <header>
    <nav>
      <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">About</a></li>
        <li><a href="#">Works</a></li>
        <li><a href="#">Contact</a></li>
        <li><a href="#">Sport</a></li>
        <li><a href="#">Tech</a></li>
        <li><a href="#">Art</a></li>
        <li><a href="#">Design</a></li>
        <li><a href="#">Economy</a></li>
        <li><a href="#">Settings</a></li>
        <li><a href="#">Profile</a></li>
      </ul>
    </nav>
  </header>
  <main id="content" role="main">
    <p>
      Lorem ipsum dolor sit amet, consectetur adipiscing elit. In ultricies viverra ullamcorper. Proin vehicula sed erat at efficitur. Cras cursus ante vel mauris convallis, at eleifend ante varius. Fusce hendrerit tortor quis mi auctor bibendum. In laoreet
      dignissim nulla, vitae dignissim erat porta ut. Nulla eu sagittis turpis. Nam lacus ligula, lobortis et efficitur eu, egestas et lorem. Sed quis commodo nisl, eget congue arcu.
    </p>
    <p>
      Vivamus sollicitudin, erat malesuada aliquam dictum, eros est euismod nulla, eget interdum ipsum erat nec arcu. Fusce lacus leo, hendrerit quis eleifend id, vestibulum quis felis. Integer tempor, arcu nec rutrum finibus, leo purus fermentum lacus, vel
      finibus elit augue vel mauris. Vivamus et feugiat enim. Aliquam dignissim molestie leo, eu dignissim quam varius sed. Nunc sit amet sem eros. Nam hendrerit quam vulputate commodo viverra. Ut nec ipsum metus. Cras tortor nibh, posuere rutrum malesuada
      ac, auctor a ante.
    </p>
    <p>
      Integer eget aliquam arcu, eget scelerisque quam. Nullam porttitor molestie diam a interdum. Sed consectetur lacinia tortor, ut elementum lacus tincidunt vitae. Vivamus tincidunt lacus a erat tempus imperdiet. Suspendisse id eros enim. Quisque eu consequat
      lacus. Nunc lectus justo, blandit ac sapien et, luctus auctor risus. Morbi at massa id lectus porta efficitur. Pellentesque ut lacus hendrerit, maximus nisi vitae, auctor ipsum. Sed bibendum molestie nibh, quis rhoncus nisi efficitur sed.
    </p>
    <p>
      Pellentesque nec lectus ex. Morbi sit amet efficitur velit. Mauris ultricies mauris lectus, eget condimentum sapien blandit vel. Ut ut blandit elit. Duis iaculis, justo eleifend venenatis elementum, purus lacus volutpat augue, quis rutrum lectus tortor
      ut ipsum. Cras pellentesque magna feugiat scelerisque interdum. Proin suscipit, sapien at mollis gravida, ligula nisi consectetur orci, sed finibus odio libero pellentesque elit. Phasellus lobortis auctor est sed auctor. Sed mattis faucibus ex,
      ac fringilla turpis placerat non.
    </p>
    <p>
      Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed hendrerit nisl mi, sed suscipit ipsum placerat at. Quisque luctus, dui vel semper ultrices, nisi dolor scelerisque urna, ut ornare dui justo vitae massa. Etiam
      gravida erat ut massa porttitor, a faucibus metus euismod. Aenean libero risus, facilisis vitae venenatis quis, scelerisque eget eros. Ut consectetur, est vel molestie placerat, lacus mauris semper diam, vel porta ante enim id ante. Praesent non
      odio at odio sagittis fermentum. Sed mi lacus, ullamcorper quis pharetra quis, varius et nunc. Ut et eros mi.
    </p>
  </main>
</div>
              
            
!

CSS

              
                body {
	font-family: 'Arial';
}

.wrapper {
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
	margin-top: 3em;
}

header {
  background: grey;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
}

nav li {
  flex: 1 1 auto;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 1em 1.5em;
  display: block;
  border-right: 1px solid;
  border-bottom: 1px solid;
  
  &:hover,
  &:focus {
    background: #000;
  }
}

.skip-link {
  position: fixed;
  top: -200px;
  background: green;
  color: #fff;
  text-decoration: none;
  padding: 10px;
  display: inline-block;
  
  &:focus {
    top: 0;
  }
}

#content {
  padding: 2em 1em;
}

#content:target {
  animation: highlight 0.75s ease-out;
}

p {
  font-size: 1.2em;
  line-height: 1.4;
}

p + p {
  margin-top: 2em;
}

@keyframes highlight {
  from {
    background: yellow;
  }
  
  to {
    background: white;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console