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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <ul class="tabs">
  <li>Tab 1</li>
  <li>Tab 2</li>
  <li class="selected">Tab 3</li>
  <li>Tab 4</li>
  <li>Tab 5</li>
</ul>
<div class="content">
Nunc id purus libero, aliquet sollicitudin risus. Fusce orci nisi, mattis et volutpat ac, varius vitae ligula. Maecenas pretium, ipsum at imperdiet gravida, nunc leo feugiat sem, vel viverra sapien turpis ut nisl. Sed enim quam, rutrum in lobortis eget, posuere sit amet nisl. Aenean ultricies turpis eu erat laoreet dignissim. Vivamus mi dolor, tincidunt a eleifend eu, auctor ac urna. Quisque eget metus quam. Donec interdum varius justo id egestas. Nulla sit amet orci nec arcu lacinia fermentum.
</div>
              
            
!

CSS

              
                body {
  color: #333;
  background: #212121;
  font-family: sans-serif;
  padding: 1em;
}

.tabs {
  margin: 0;
  padding: 0;
}

.tabs li {
  display: inline-block;
  padding: 5px 1em 2px;
  background: #ddd;
  border-radius: 8px 8px 0 0;
  border-color: #BB4900;
  border-style: solid solid none solid;
  border-width: 2px;
  vertical-align: bottom;
  color: #444;
  cursor: pointer;
}

.tabs li.selected {
  background: white;
  position: relative;
  border-color: #FF6300;
  padding-bottom: 4px;
  top: 2px;
  color: #333;
}

.content {
  background: white;
  padding: .8em 1em;
  border: solid #FF6300 2px;
}
              
            
!

JS

              
                $(".tabs li").on("click", function() {
  $(".selected").removeClass("selected");
  $(this).addClass("selected");
  
  var $content = $(".content");
    $content.html(_.shuffle($content.html().split(/ /)).join(" "));
});
              
            
!
999px

Console