Pen Settings



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


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


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.


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.


                <p class="font-changer">FONT SIZE: <span class="js-font-decrease">A</span> <span class="js-font-normal">A</span> <span class="js-font-increase">A</span></p>
<p>Change the font size then refresh the page to see it stay the same</p>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iusto totam minus voluptates consectetur doloribus beatae, asperiores, eaque ipsa perspiciatis dolores voluptate esse magni quisquam dolorum maxime ab molestiae dolor dicta.</p>



                html {
  font-size: 100%;

p {
  text-align: center;
  line-height: 1.5;
  padding: 0 20px;

span {
  cursor: pointer;

.js-font {
  //should probably set  the font-size to a px/rem/em instead of %
  &-decrease {
    font-size: 75%;
  &-increase {
    font-size: 125%;


                (function($) {
  function changeFont(fontSize) {
      return function() {
         $('html').css('font-size', fontSize + '%');
         sessionStorage.setItem('fSize', fontSize);

    var normalFont = changeFont(100),
    		mediumFont = changeFont(115),
    		largeFont  = changeFont(125);

    $('.js-font-decrease').on('click', function(){

    $('.js-font-normal').on('click', function(){

    $('.js-font-increase').on('click', function(){

    if (sessionStorage.length !== 0) {
      $('html').css('font-size', sessionStorage.getItem('fSize') + '%');