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.


                <h1>Improving Web Font Performance with Local Storage (Demo)</h1>

<p>I am speaking on literary criticism, and in the world in which we are actually living that is almost as unpromising as speaking about peace. This is not a peaceful age, and it is not a critical age. In the Europe of the last ten years literary criticism of the older kind — criticism that is really judicious, scrupulous, fair-minded, treating a work of art as a thing of value in itself — has been next door to impossible.</p>

<p class="p">Demo by Luis Vieira. <a href="" target="_blank">See article</a> (publishing April 7, 2015).</p>


                body {
  text-align: center;
  line-height: 1.5;
  padding: 0 30px;

.fallback {
  font-family: 'Georgia', serif;
  line-height: 1.7em;
  letter-spacing: 1px;
  font-size: 15px;

.webFont {
  font-family: 'vollkornregular', serif;
  line-height: 1.6em;
  letter-spacing: 1px;
  font-size: 16px;

p {
  text-align: left;

.p {
  padding-top: 100px;
  text-align: center;
  font-size: 14px;


                (function () {
  'use strict';
  document.documentElement.className = 'fallback';
  var css_href = '';
  var localStorageSupported = function() {
    try {
      localStorage.setItem('test', 'test');
      return true;
    } catch(e) {
      return false;

  if (localStorageSupported() && localStorage.spdemowebFonts) {
  } else {
    window.onload = function() {

  function injectFontsStylesheet() {
    var xhr = new XMLHttpRequest();'GET', css_href, true);
      xhr.onreadystatechange = function() {
        if (xhr.readyState === 4) {
          localStorage.setItem('spdemowebFonts', xhr.responseText);

  function injectRawStyle(text) {
    var style = document.createElement('style');
    style.innerHTML = text;
    document.documentElement.className = 'webFont';