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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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.


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.


                <button style="float:right;" onclick="document.documentElement.classList.toggle('wf-active');return false;">toggle font</button>

<h1>Font styled heading</h1>

<p>This demonstration uses a loader to dynamically load a web font. The default font is adjusted to ensure weights and spacing is approximately equivalent so the web font replacement isn't too jarring.</p>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Omnis laudantium accusamus veniam necessitatibus? Iste, voluptatibus, incidunt. Voluptatum perspiciatis non est, quasi dolore deleniti dicta id praesentium illum vel officiis accusantium!</p>

<h2>A new sub-heading</h2>
<p>Aliquam ut mi et mauris ornare faucibus ac nec dolor. Nunc sed scelerisque leo. In viverra semper nulla, in rhoncus massa dapibus sit amet.</p>

  <li>Donec vitae imperdiet leo. Curabitur arcu orci, congue nec tempor vitae, molestie at sem.</li>
  <li>Phasellus eget arcu eu velit semper dignissim. Aenean auctor sed neque nec egestas.</li>
  <li>Pellentesque velit lectus, fringilla sed tincidunt sed, euismod id velit.</li>


                /* default styles */
body {
  font-family: arial, sans-serif;
  font-size: 100%;
  margin: 20px;
  color: #333;
  background-color: #eee;

h1, h2 {
  font-size: 1.6em;
  font-weight: 700;
  font-style: italic;
  line-height: 1.2;
  margin: 0 0 0.3em 0;

h2 {
  font-size: 1.3em;
  font-weight: 500;
  margin: 1em 0 0 0;

li {
  margin: 0.5em 0;

p {
  line-height: 1.5;
  margin: 0 0 1em 0;

button {
  font-family: arial;
  text-transform: uppercase;
  letter-spacing: 0;

/* fix arial spacing */
li, p {
  letter-spacing: 0.0125em;

/* web fonts activated */ body {
  font-family: 'Ubuntu';
} li, p {
  letter-spacing: 0;


                // font loader
var WebFontConfig = {
  google: {
    families: [ 'Ubuntu:400,300,400italic,300italic,500italic,500,700,700italic:latin' ]
  timeout: 2000


  "use strict";

  var wf = document.createElement("script");
  wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
  wf.async = 'true';