Pen Settings



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


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


Add Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import or require. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.


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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <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';